[DSV4] Fix draft-extend CUDA graph padding and WAR ordering - #31270
Open
weireweire wants to merge 2 commits into
Open
weireweire wants to merge 2 commits into
weireweire wants to merge 2 commits into
Conversation
weireweire
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
Ying1123,
hebiao064,
hnyls2002,
ispobock and
merrymercy
as code owners
July 15, 2026 03:37
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
5 tasks
Collaborator
|
@weireweire Could you fix lint issue? thanks |
Collaborator
|
@weireweire Could you fix the conflicts? thanks! |
weireweire
force-pushed
the
fix/dsv4-draft-extend-cudagraph-correctness
branch
from
August 4, 2026 09:26
4185a35 to
58d5a5b
Compare
Contributor
Author
|
/tag-and-rerun-ci |
41 tasks
weireweire
force-pushed
the
fix/dsv4-draft-extend-cudagraph-correctness
branch
from
August 5, 2026 06:28
58d5a5b to
12f96f6
Compare
Collaborator
|
/rerun-failed-ci |
Collaborator
|
@weireweire Could you fix the conflicts? thanks! |
Collaborator
|
/rerun-failed-ci |
Collaborator
|
@weireweire could you rebase/merge with main? |
Root cause: CUDA graph bucket padding fills DSV4 request lengths with 1 even when the captured draft width is larger. Expanding those rows produced negative causal lengths and positions. DSV4 also translates the live full-to-SWA mapping inside the captured graph, but the draft-extend runner published its scheduler WAR read-done event before replay. Fix: Clamp DSV4 uniform-width causal lengths to the reserved length-1 padding row. Add an explicit attention-backend capability for replay-time shared-buffer reads and defer the WAR event until after replay for DSV4 while preserving the pre-replay fast path for other backends. Validation: A baseline CUDA reproduction produced causal lengths [-2, -1, 0, 1] and confirmed the read-done event preceded replay. The focused padding and event-order tests pass in a CUDA 13 SGLang environment, and pre-commit passes on all files.
weireweire
force-pushed
the
fix/dsv4-draft-extend-cudagraph-correctness
branch
from
August 12, 2026 09:53
07e1f7a to
1313330
Compare
Collaborator
|
@weireweire could you fix the conflicts? |
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
Follow-up to #30853. Enabling DSV4 draft-extend CUDA graphs exposes two correctness issues:
Changes
This follows the same padded-row underflow diagnosis fixed for DSA in #30378. The WAR ordering follows the existing distinction between snapshot-complete reads (#29541) and replay-time captured-metadata reads (#30261).
Validation
Checklist
CI States
Latest PR Test (Base): ❌ Run #31584979461
Latest PR Test (Extra): ❌ Run #31584979150