[DeepSeek-V4][DSpark] Handle zero-length CUDA graph padding in online C128 planner - #35848
Open
BJWang-ant wants to merge 2 commits into
Open
BJWang-ant wants to merge 2 commits into
BJWang-ant wants to merge 2 commits into
Conversation
BJWang-ant
requested review from
BBuf,
DarkSharpness,
HaiShaw,
HydraQYH,
celve and
yuan-luo
as code owners
August 21, 2026 10:03
This was referenced Sep 6, 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.
Motivation
Fix online C128 compression for DeepSeek-V4 with DSpark compact ragged verification and CUDA graph enabled.
The issue can be reproduced with:
DSpark compact verification uses ragged verify lengths. During CUDA graph replay, the request batch is padded to the selected graph bucket size. Rows that do not correspond to active requests are represented by:
These padded rows contain no query tokens and should not generate online C128 compression or state-pool write plans.
Previously, _plan_prefill_partial required every row to satisfy:
0 < extend_len && extend_len <= seq_lenAs a result, the first CUDA graph replay containing padded DSpark rows failed with a RuntimeCheck.
This was not normally observed in the Eagle/MTP path because its verification layout uses a fixed number of draft tokens for every request row. DSpark compact verification, however, has variable verify lengths and zero-length graph padding rows.
Changes
This PR is bound to PR32035 and needs to be tested on PR32035.[DeepSeek-V4]support dspark c128 online compressor #32035
CI States
Latest PR Test (Base): ❌ Run #32686880436
Latest PR Test (Extra): ❌ Run #32686880377
Latest PR Test (AMD ROCm 7.2): ❌ Run #32686880437