Repository navigation
[Fix] deepseek-v4.1: Exchange late-layer DP row counts before the forward - #44948
Merged
Merged
Conversation
hnyls2002
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
ch-wan,
fzyzcjy,
hebiao064,
ispobock and
merrymercy
as code owners
October 18, 2026 04:16
Collaborator
Author
|
/rerun-test test_dsv41_late_layer_tail_readers.py test_mlp_sync_hybrid_target_verify.py test_encoder_swa_replay.py test_mlp_sync_pad_unpad.py registered/unit/spec/test_dp_spec_prefill_coordination.py test_deepseek_v41_flash_gb300_dp4ep4.py test_deepseek_v4.py |
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
|
🚀 🚀 🚀 🚀 |
4 of 5 tasks
This was referenced Oct 18, 2026
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.
DeepGEMM grid sync timeout). Every step with one prefilling and one idle rank hung, including the multimodal startup warmup.ForwardBatch.prepare_mlp_sync_batchnow exchanges each rank's late-layer rows intoglobal_late_layer_num_tokens_cpu. Every rank reaches it after its batch is padded and before it picks the prefill graph or eager.late_layer_dp_countsreads the exchanged rows and asserts this rank's own entry; a step without an extend keeps the in-forward gather, which every rank then takes.AttentionBackend.late_layer_num_tokensreturns None; the DeepSeek-V4 CUDA and ROCm backends count an extend's tail rows withlate_layer_tail_lens, as the tail metadata does, and every row otherwise.test_mlp_sync_hybrid_target_verify.pynow states that its backend has no late-layer rows.--cuda-graph-backend-prefill breakable: the server starts (it hung at the multimodal warmup before), four single requests each replay the graph next to an idle rank, and GSM8K on all 1,319 questions scores 96.97%.No behavior change without decoder SWA bounded replay and DP attention. With them, a prefill-graph step adds one CPU all-gather of one int per rank, and an eager step runs that gather before the forward instead of inside it.
CI States
Latest PR Test (Base): 🚫 Run #39096858005
Latest PR Test (Extra): ❌ Run #39096857974
Latest PR Test (AMD ROCm 10): ⏳ Run #39096858010