Repository navigation
[Fix] Size the prefill delayer's gather buffer to its TP group - #41809
Merged
Merged
Conversation
ch-wan
requested review from
Ying1123,
hnyls2002,
merrymercy and
xiezhq-hermann
as code owners
September 30, 2026 03:07
This was referenced Sep 30, 2026
ch-wan
force-pushed
the
cheng/hot-fix/dflash-lilicorr-draft-scope
branch
from
September 30, 2026 04:24
e0a6a7c to
e25092f
Compare
ch-wan
requested review from
BBuf,
Edwardf0t1,
FlamingoPg,
Qiaolin-Yu,
alexnails,
alphabetc1,
hanming-lu,
huangtingwei9988,
hzh0425,
ispobock,
liusy58 and
yizhang2077
September 30, 2026 04:24
ch-wan
requested review from
Alisehen,
AniZpZ,
HaiShaw,
OrangeRedeng,
b8zhong and
mmangkad
September 30, 2026 04:24
ch-wan
force-pushed
the
cheng/hot-fix/prefill-delayer-cp-gather
branch
from
September 30, 2026 04:24
54c6abe to
defe8e8
Compare
ch-wan
force-pushed
the
cheng/hot-fix/dflash-lilicorr-draft-scope
branch
from
September 30, 2026 05:05
e25092f to
0b5ba8c
Compare
ch-wan
force-pushed
the
cheng/hot-fix/prefill-delayer-cp-gather
branch
from
September 30, 2026 05:05
defe8e8 to
3284778
Compare
ch-wan
force-pushed
the
cheng/hot-fix/dflash-lilicorr-draft-scope
branch
from
September 30, 2026 20:25
0b5ba8c to
57f0511
Compare
Base automatically changed from
cheng/hot-fix/dflash-lilicorr-draft-scope
to
main
September 30, 2026 20:25
The prefill delayer all-gathers one info row per rank over the TP group, but sized the receive buffer `(dp, attn_tp_size, 5)`. The TP group is `dp * attn_cp_size * attn_tp_size` wide, so with attention context parallelism the buffer was `attn_cp_size` times too small, and the first gather took the scheduler down. Size it `(dp, attn_cp_size * attn_tp_size, 5)`, the same layout the MLP sync batch info uses. `[:, 0, :]` still selects the first rank of each DP group. Without attention CP the shape is unchanged. The new test runs `_gather_info` against an all-gather that enforces what `all_gather_into_tensor` does -- the output holds one input per rank of the TP group -- and checks that each DP group's first rank comes back, across TP, attention CP, DP attention, and DP attention with attention CP.
ch-wan
force-pushed
the
cheng/hot-fix/prefill-delayer-cp-gather
branch
from
September 30, 2026 20:26
3284778 to
2ea8e58
Compare
4 of 5 tasks
This was referenced Oct 2, 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.
This PR is part of a stack (oldest at bottom):
Motivation
The prefill delayer all-gathers one info row per rank over the TP group, but sizes the receive buffer
(dp, attn_tp_size, 5). The TP group isdp * attn_cp_size * attn_tp_sizewide. With attention context parallelism the buffer isattn_cp_sizetimes too small, and the first gather takes the scheduler down.Modifications
(dp, attn_cp_size * attn_tp_size, 5), the layout the MLP sync batch info uses.[:, 0, :]still selects the first rank of each DP group. Without attention CP the shape is unchanged.test_prefill_delayer_gather.pyruns_gather_infoagainst an all-gather that enforces whatall_gather_into_tensordoes (the output holds one input per rank of the TP group). It checks that each DP group's first rank comes back across TP, attention CP, DP attention, and DP attention with attention CP.Accuracy Tests
H200, Qwen3-30B-A3B-FP8,
--tp-size 4 --moe-dp-size 1 --ep-size 4 --attn-cp-size 2 --enable-prefill-cp --cp-strategy zigzag --cuda-graph-backend-prefill=disabled, GSM8K 200 questions:--enable-prefill-delayerProcessGroupGloo::allgather: invalid tensor size)test/registered/unitat this PR's head, compared withmain: no new failures.Speed Tests and Profiling
Not applicable.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): 🚫 Run #36772605288
Latest PR Test (Extra): 🚫 Run #36772604827
Latest PR Test (AMD ROCm 10): 🚫 Run #36772605125