Skip to content

[Perf] dsv4: Replay the V4.1 prefill graph past 16K contexts on SM90 - #45941

Merged
hnyls2002 merged 3 commits into
mainfrom
lsyin/dsv41-sm90-any-context-prefill-graph
Oct 23, 2026
Merged

hnyls2002 merged 3 commits into
mainfrom
lsyin/dsv41-sm90-any-context-prefill-graph

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator
  • On CUDA, the DeepSeek-V4.1 prefill CUDA graph builds its replay metadata at the live context width whenever no c4/c128 compress metadata is captured, so SM90 replays contexts past 16K as SM100 already does. Nothing captured on that path depends on the width: the width-sized metadata is swapped in per replay, and without two-level candidates the ratio-1/2 sources run as one eager break.
  • The 16K default moves to the HIP backend, whose prefill graph metadata is captured at a fixed width; HIP keeps its behavior.
  • TestPrefillGraphReplayContext checks the live width for V4.1 and the fixed width with c4/c128 metadata.

Behavior change only for V4.1 with --cuda-graph-backend-prefill breakable on CUDA without two-level candidates (SM90): contexts past 16K replay the graph instead of running eager. Under attention context parallelism, which had no default limit, replay metadata is built at the live width instead of the table width. Follows #45407.


CI States

Latest PR Test (Base): 🚫 Run #39892668558
Latest PR Test (Extra): ❌ Run #39892668458
Latest PR Test (AMD ROCm 10): ⏳ Run #39892668514

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/rerun-test test_deepseek_v4.py test_dsv41_late_layer_tail_readers.py test_prefill_cuda_graph_runner.py test_prefill_cuda_graph_runner_helpers.py test_encoder_swa_replay.py test_deepseek_v41_flash_gb300_tp2ep2.py test_deepseek_v41_flash_gb300_dp2ep2.py test_deepseek_v41_flash_gb300_encoder_bcg.py test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@github-actions github-actions Bot added the run-ci CI: run the baseline test suite on this PR label Oct 23, 2026
@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🚀 4-gpu-b200 (1 test): ✅ View workflow run

cd test/ && python3 registered/attention/unittests/dsv4/test_deepseek_v4.py

🚀 1-gpu-h100 (1 test): ✅ View workflow run

cd test/ && python3 registered/attention/unittests/dsv4/test_deepseek_v4.py

🚀 ubuntu-latest (4 tests): ✅ View workflow run

cd test/ && python3 registered/unit/layers/test_dsv41_late_layer_tail_readers.py
cd test/ && python3 registered/unit/model_executor/test_prefill_cuda_graph_runner.py
cd test/ && python3 registered/unit/model_executor/test_prefill_cuda_graph_runner_helpers.py
cd test/ && python3 registered/unit/model_executor/test_encoder_swa_replay.py

🚀 2-gpu-gb300 (4 tests): ✅ View workflow run

cd test/ && python3 registered/e2e/models/test_deepseek_v41_flash_gb300_tp2ep2.py
cd test/ && python3 registered/e2e/models/test_deepseek_v41_flash_gb300_dp2ep2.py
cd test/ && python3 registered/e2e/models/test_deepseek_v41_flash_gb300_encoder_bcg.py
cd test/ && python3 registered/e2e/models/test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepseek run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant