[PD] Fix PD disaggregation decode warmup crash under DP-attention (#30748) - #32187
Closed
whybeyoung wants to merge 1 commit into
Closed
whybeyoung wants to merge 1 commit into
whybeyoung wants to merge 1 commit into
Conversation
whybeyoung
requested review from
CatherineSue,
JustinTong0323,
ispobock,
merrymercy and
slin1237
as code owners
July 23, 2026 08:59
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
whybeyoung
force-pushed
the
fix_pd_warmup_route_dp
branch
from
July 23, 2026 09:31
734a6e3 to
7a78e05
Compare
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
|
hi, thanks for investigating this. About the batch shape issue, even though the old code with batch size |
PR #30748 changed the PD warmup from a single batched POST to dp_size concurrent single-sequence POSTs (one per DP rank via routed_dp_rank). With enable_dp_attention / enable_dp_lm_head enabled, this leaves every DP rank processing a lone fake req instead of the joint dp_size batch the scheduler used to see, breaking cross-rank batch shape assumptions and crashing on the decode side with: /pytorch/aten/src/ATen/native/cuda/IndexKernelUtils.cu:16: vectorized_gather_kernel: Assertion `ind >= 0 && ind < ind_dim_size` failed surfaced at result.copy_done.synchronize() in scheduler_components/batch_result_processor.process_batch_result_decode. Keep the fan-out (so every DP rank still reliably receives its fake req), but pad each POST body with dp_size aligned fake sequences by sending arrays for sampling_params / bootstrap_host / bootstrap_room / input_ids / routed_dp_rank. This restores the pre-#30748 batch shape seen by each scheduler and keeps DP-attention shapes consistent across ranks. Also uses well-separated bootstrap_room ids (spaced with the pre-#30748 formula) so they never collide with the 0 reset marker used by DecodePreallocQueue metadata buffers.
whybeyoung
force-pushed
the
fix_pd_warmup_route_dp
branch
from
July 24, 2026 06:13
7a78e05 to
4d37332
Compare
21 tasks
Collaborator
Author
|
closed it as solved in main |
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.
motivation
Fix #32182 introduced by PR #30748
PR #30748 changed the PD warmup from a single batched POST to dp_size concurrent single-sequence POSTs (one per DP rank via routed_dp_rank). With enable_dp_attention / enable_dp_lm_head enabled, this leaves every DP rank processing a lone fake req instead of the joint dp_size batch the scheduler used to see, breaking cross-rank batch shape assumptions and crashing on the decode side with:
/pytorch/aten/src/ATen/native/cuda/IndexKernelUtils.cu:16:
vectorized_gather_kernel: Assertion
ind >= 0 && ind < ind_dim_sizefailedsurfaced at result.copy_done.synchronize() in
scheduler_components/batch_result_processor.process_batch_result_decode.
Keep the fan-out (so every DP rank still reliably receives its fake req), but pad each POST body with dp_size aligned fake sequences by sending arrays for sampling_params / bootstrap_host / bootstrap_room / input_ids / routed_dp_rank. This restores the pre-#30748 batch shape seen by each scheduler and keeps DP-attention shapes consistent across ranks.
Also uses well-separated bootstrap_room ids (spaced with the pre-#30748 formula) so they never collide with the 0 reset marker used by DecodePreallocQueue metadata buffers.
CC @hnyls2002 @ShangmingCai @hzh0425
CI States
Latest PR Test (Base): ❌ Run #30071651285
Latest PR Test (Extra): ❌ Run #30071651165