Repository navigation
[Feat] [NVIDIA] deepseek-v4.1: Support prefill CP with BCG in PD serving (2/N) - #40333
Open
BJWang-ant wants to merge 13 commits into
Open
BJWang-ant wants to merge 13 commits into
BJWang-ant wants to merge 13 commits into
Conversation
BJWang-ant
requested review from
BBuf,
ByronHsu,
Duyi-Wang,
Edwardf0t1,
Fridge003,
HaiShaw,
Qiaolin-Yu,
ShangmingCai,
Ying1123,
alphabetc1,
ch-wan,
hanming-lu,
hebiao064,
hnyls2002,
huangtingwei9988,
hzh0425,
ispobock,
merrymercy,
sogalin,
xiezhq-hermann and
yizhang2077
as code owners
September 19, 2026 09:58
This was referenced Sep 19, 2026
Contributor
17 of 56 tasks
Contributor
Author
|
/rerun-test test_dsv41_shared_prefill_kv.py test_deepseek_v41_pd_cp_dspark.py test_deepseek_v4_flash_fp4_h200.py test_deepseek_v4_flash_fp4_b200.py test_deepseek_v4_flash_fp4_megamoe_b200.py test_deepseek_v41_flash_gb300_dp4ep4.py test_deepseek_v41_flash_gb300_encoder_bcg.py test_deepseek_v41_flash_gb300_tp4ep4.py test_deepseek_v41_flash_gb300_trtllm_bounded_bcg.py |
Contributor
|
🚀 🚀 🚀 🚀 ⛔ |
Contributor
Author
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
2 times, most recently
from
October 22, 2026 03:11
0b1404c to
99809cd
Compare
Collaborator
|
PR ready. Will merge later |
Oasis-Git
approved these changes
Oct 22, 2026
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
from
November 3, 2026 05:07
99809cd to
85af6fa
Compare
Contributor
Author
This comment has been minimized.
This comment has been minimized.
Contributor
Author
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
from
November 4, 2026 03:12
85af6fa to
05327bb
Compare
This comment has been minimized.
This comment has been minimized.
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
from
November 4, 2026 10:18
05327bb to
4811e37
Compare
This comment has been minimized.
This comment has been minimized.
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
from
November 5, 2026 03:12
4811e37 to
69ee5f3
Compare
Use live prompt rows for low-ratio compressed state when CP BCG replays a larger capture bucket. Adapt FP4 logits and SM100 metadata to the current DeepGEMM varlen API while keeping FP32 output contracts. Validation: 34 CPU regression tests; full GSM8K 1272/1319 (96.44%), zero errors/truncations. All 940 real prefill batches per CP rank hit CUDA graph.
Remove the 0.2.8-specific BF16 weights, output casts, and forced varlen metadata/indices. Restore clean_logits arguments and the original FP32 output path while retaining CP BCG live-token handling. Validated with DeepGEMM 0.2.1.post1 on B200: 34 CPU tests, flat/paged numerical checks, full GSM8K 1275/1319 (96.66%) with zero errors/truncations, and 562 real prefill batches per CP rank all using CUDA graph.
BJWang-ant
force-pushed
the
main-v4.1-cp-bcg
branch
from
November 6, 2026 05:24
69ee5f3 to
70a7046
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




issue:#39700
base pr:#40323
Motivation
Enable DeepSeek V4.1 prefill nodes to use interleave context parallelism (CP) together with breakable CUDA graphs (BCG), including prefill/decode disaggregated serving.
This allows prefill computation to run across CP ranks while preserving graph replay correctness for batches with different prompt lengths and request layouts.
Modifications
gms8k preicition test:

perf:

hardware
B200 && H200
CI States
Latest PR Test (Base): ⏳ Run #42168284764
Latest PR Test (Extra): ❌ Run #42168284579
Latest PR Test (AMD ROCm 10): ⏳ Run #42168284814
Tip
Base CI only covers the core cases, and its workload may not exercise your change. Use
/rerun-testto run the tests your change touches, or copy this prompt for an agent: