Repository navigation
[Feat] spec: Support CUDA attention DP for DFlash and DFlash2 - #46330
Merged
Merged
Conversation
ch-wan
requested review from
Fridge003,
JustinTong0323,
Qiaolin-Yu,
Ying1123,
hnyls2002,
ispobock,
merrymercy,
sogalin,
wisclmy0611 and
zijiexia
as code owners
October 24, 2026 20:27
5 tasks done
Collaborator
Author
|
/rerun-test test_dflash_dp_attention.py |
Contributor
|
⛔
Please provide the full path, e.g. |
ch-wan
force-pushed
the
cheng/dev/dflash-dp-attention
branch
from
October 24, 2026 21:06
f31e240 to
95c138a
Compare
ch-wan
force-pushed
the
cheng/refactor/draft-parallel-placement
branch
from
October 24, 2026 21:06
42a50ed to
8755705
Compare
Collaborator
Author
|
/rerun-test test/registered/e2e/speculative/test_dflash_dp_attention.py |
Contributor
|
🚀 |
ch-wan
force-pushed
the
cheng/dev/dflash-dp-attention
branch
from
October 25, 2026 04:18
95c138a to
f50467b
Compare
ch-wan
force-pushed
the
cheng/refactor/draft-parallel-placement
branch
from
October 25, 2026 04:30
9bb151b to
08a8d91
Compare
ch-wan
requested review from
hanming-lu,
kpham-sgl,
pyc96 and
xiezhq-hermann
as code owners
October 25, 2026 04:30
ch-wan
requested review from
alphabetc1,
huangtingwei9988,
hzh0425 and
yizhang2077
as code owners
October 25, 2026 04:30
Base automatically changed from
cheng/refactor/draft-parallel-placement
to
main
October 25, 2026 04:32
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
ch-wan
force-pushed
the
cheng/dev/dflash-dp-attention
branch
from
October 25, 2026 04:32
f50467b to
3a19e04
Compare
Open
3 of 5 tasks
5 tasks
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 merged stack (oldest at bottom):
Motivation
CUDA currently rejects DFLASH with attention DP. Enable plain DFlash and selector-based DFlash2 using the draft placement resolved by #46290, including unequal local batches and idle DP replicas.
Modifications
--enable-dp-lm-head, CP=1 and PP=1. Reject Domino/LiLiCorr heads and the unimplemented experimental heterogeneous prefill/verify coordination mode.skip_attn_backend_initargument.The skip-argument changes are confined to DFLASH callers; EAGLE/NextN metadata decisions and the shared runner are unchanged. Empty idle mRoPE initialization is a shared
ForwardBatchchange and also applies to other algorithms using mRoPE models. Non-DP/DSpark preplanning defaults and NPU-specific behavior are preserved.Accuracy Tests
Current head:
3a19e047cd4005fab35678d800a7d790f5bafd30, rebased onto main6623ea445a287ff89fa61165a9d129daeee4ac34after #46290 merged. Tests were not rerun for this landing rebase; the results below retain their original revision attribution. The parent now fixes the CPU source-audit failure by using sequence-checked DP slot reads in its draft-scope test. The DFLASH feature patch is unchanged by restacking.Follow-up validation at
f50467b918d3849db781dd5cd98e98fec4b96b9c: 180 CPU tests passed across the completetest_draft_tp_context.py(11) andtest_runtime_context.py(169), including the previously failing full-checkout raw-slot scan. Changed-file pre-commit and whitespace checks passed. Only the inherited test changed from the previous stack head; production code and the architecture allowlist are unchanged. The original feature results below retain their original commit attribution; GPU tests were not repeated for this test-only fix.Tested commit
f31e240a083d25a5e6d21b5ea50f7f7be11c3bb8, based on #46290 at42a50ed474230f2dc85652539307bbc304dd0dbd.CPU: 100 passed, 1 skipped. Includes 9 new admission/embedding/metadata cases and 91 existing DFLASH, metadata-plan and fused-placement checks. The skipped Triton test requires CUDA. Changed-file pre-commit checks passed.
GPU: 4 × NVIDIA H200, TP4 / attention DP2. Deterministic FA3 target with FlashInfer draft, compared against target-only at the same TP/DP layout:
Qwen/Qwen3-4B/z-lab/Qwen3-4B-DFlash-b16Qwen/Qwen3.8-27B/incoai/Qwen3.8-27B-DFlash2Each fixture also passed a 64-token sampled smoke. Cases cover individual DP replicas, idle peers, concurrent unequal lengths and prefix reuse, with target CUDA graphs enabled. Additional FlashInfer target/draft eager and graph runs completed for both families; actual target graph execution was observed. A non-DP TP4 DFLASH graph smoke also completed.
Run the registered regressions with:
Environment: driver 595.71.05, Torch 2.14.1+cu130, FlashInfer 0.7.2, sglang-kernel 0.4.10, DeepEP 0.1.2.post1, DeepGEMM 0.2.3.post2 and Transformers 5.19.0.
Limits: exact parity is established for the deterministic, same-layout comparisons above; default FlashInfer target-only output itself varied with batch shape. This feature commit has no dedicated DP + EAGLE/MTP GPU regression. NPU, CP, PP, MoE transports, quantized embedding checkpoints, LoRA and multimodal inputs were not qualified on device. Documentation build checks were not run.
Speed Tests and Profiling
No performance benchmark was run; no speedup claim.
Checklist
CI States
Latest PR Test (Base): 🚫 Run #40162290440
Latest PR Test (Extra): 🚫 Run #40162290449
Latest PR Test (AMD ROCm 10): ⏳ Run #40162290559