Repository navigation
[Perf] Add fused DFlash2 grouped convolution - #55960
Merged
benchislett merged 7 commits intoSep 17, 2026
Merged
Conversation
Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: mgoin <mgoin64@gmail.com>
mgoin
force-pushed
the
mgoin/dflash2-fused-grouped-conv
branch
from
September 11, 2026 19:56
ad14a64 to
fd19503
Compare
mgoin
marked this pull request as ready for review
September 11, 2026 19:56
mgoin
requested review from
Harry-Chen,
khluu,
sighingnow and
vadiklyutiy
as code owners
September 11, 2026 19:56
Use row-aligned tiles with an alignment-aware 512/1024 selection. Cover both tile paths and replace the GSM8K target with the NVFP4 checkpoint. Validated with 16 focused tests, 570 bitwise boundary checks, and full NVFP4 GSM8K (92.2%, acceptance length 6.14). Signed-off-by: mgoin <mgoin64@gmail.com>
mgoin
force-pushed
the
mgoin/dflash2-fused-grouped-conv
branch
from
September 12, 2026 00:31
3a73f67 to
b8a5cd1
Compare
Signed-off-by: mgoin <mgoin64@gmail.com>
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #88676 for commit |
benchislett
enabled auto-merge (squash)
September 17, 2026 19:27
Member
Author
|
/ci run |
|
✅ Triggered Buildkite CI #89703 for commit |
This was referenced Sep 21, 2026
vllm-agent
pushed a commit
to vllm-agent/vllm
that referenced
this pull request
Sep 23, 2026
)" This reverts commit db7a24c. Since this merged (Sep 17), the AL DFlash nightly lane fails its acceptance-length threshold on main (3.060 measured vs 3.195 expected, accuracy fine at 0.880). The lane is nightly-only and was absent from the PR's CI render (#89703) — a documented selection leak (ci-infra vllm-project#612). Reverting to green; the author can reland with acceptance coverage intact. Signed-off-by: kimi-no-na-wa <kimi-no-na-wa@users.noreply.github.com>
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
Signed-off-by: mgoin <mgoin64@gmail.com>
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.
Summary
qwen3_dflash2.py.The implementation docstring credits LightSeek TokenSpeed PR lightseekorg/tokenspeed#1399.
End-to-end validation
One NVIDIA B300, TP=1, V2 model runner, compilation and CUDA graphs enabled. Target:
nvidia/Qwen3.8-27B-NVFP4; unchanged BF16 draft:z-lab/Qwen3.8-27B-DFlash2. Full GSM8K: 1,319 questions, 5-shot chat, thinking disabled, temperature 0, max output 256 tokens, max model length 4,096, max batch 32, seven speculative tokens.All passed. Acceptance length is
1 + accepted_tokens / draft_steps. Accuracy varies across runs; this is not an exact-output-equivalence claim. The compiled draft graph was inspected to confirm it invokes the convolution custom op. CI checks accuracy >= 90% and AL >=6.14 * 0.95(5.833).The NVFP4 target reduces reported target-plus-draft model-load memory from 54.0 GiB to 22.85 GiB; this is not total serving/KV-cache memory. The case runs in the existing H200 35 GB DFlash nightly job, with its 90-minute timeout unchanged, and remains excluded from the AMD mirror. H200 has a Marlin weight-only fallback for the NVFP4 target. Local validation was on B300; H200 execution and memory fit remain unverified.
Earlier BF16-target validation also passed: original Torch convolution 92.2% / AL 6.19; initial fused kernel 92.0% / AL 6.19 in two runs. CI now uses the smaller NVFP4 checkpoint instead.
Kernel performance
Initial fusion versus Torch (before the final row-aligned tuning)
Actual checkpoint shape: hidden size 5,120, BF16, block size 8, group size 16, two taps, strided coefficients. B300, FlashInfer CUPTI timing, CUDA graphs, cold L2, four alternating-order trials; median latency. Baseline is the existing expression under
torch.compile. Correctness checked before timing.Effective bandwidth counts each input once and the output once:
2 * (2*rows*5120 + rows*2*320 + 2*5120)bytes,rows = batch*8. These are kernel-only gains, not end-to-end speedups; batch 1 is approximately neutral.Final row-aligned tuning versus the posted fused kernel
Integrated confirmation on all 11 surveyed hidden-width/block-size pairs, at batches 1/32/256, BF16, group 16, two taps, strided coefficients. B300, CUPTI, CUDA graphs, cold L2, four alternating-order trials of 100 ms. Compared with posted commit
fd19503785: batch 1 is effectively unchanged; batch 32 is 1.006–1.172x faster; batch 256 is 1.078–1.328x faster.Representative batch-256 results (posted fused kernel → final tuned kernel):
Useful bytes =
2 * (2*rows*hidden + (2*rows-batch)*(hidden/16) + 2*hidden), excluding unused second-tap coefficients at block starts. This is an ideal useful-bandwidth estimate, not measured HBM traffic. These remain kernel-only speedups. Block-7/anchor/MoE entries in the shape sweep are kernel coverage, not full-model compatibility claims.Tests
All GPU workloads used
chg run -g=1 --; noCUDA_VISIBLE_DEVICESoverrides. Commands below assume the checkout's Python environment is activated (including itsbindirectory on PATH):ninjawas missing from PATH; using the already-installed venvbindirectory resolved it without dependency/code changes.Duplicate work
Rechecked open vLLM PRs for
dflash2 conv,fused grouped conv, and DFlash2 GSM8K/acceptance coverage. No other open PR implements this kernel/dispatch or this CI case. The companion TP-reduction and packed-top-k PRs remain separate.AI assistance was used to analyze the upstream implementation, implement the change, and write/run the tests and benchmarks. Human submitter review is required before merge.