Repository navigation
[Perf][Qwen4Exp] Add SM80 TP=8 skinny GEMM plans - #64636
Open
kimseunghyun-kr wants to merge 3 commits into
Open
kimseunghyun-kr wants to merge 3 commits into
kimseunghyun-kr wants to merge 3 commits into
Conversation
kimseunghyun-kr
requested review from
AndreasKaratzas,
WoosukKwon,
mgoin,
tlrmchlsmth,
yewentao256 and
zyongye
as code owners
October 30, 2026 14:50
gau-nernst
reviewed
Oct 30, 2026
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
kimseunghyun-kr
force-pushed
the
qwen4exp-sm80-skinny-plans
branch
from
October 31, 2026 15:29
b26ff89 to
eb9172b
Compare
Contributor
Author
|
@gau-nernst, a gentle ping on your question about other architectures. Since b26ff89, SM90+ compiles the same (Drafted with AI assistance; I reviewed it.) |
kimseunghyun-kr
force-pushed
the
qwen4exp-sm80-skinny-plans
branch
from
November 3, 2026 02:48
eb9172b to
3e69fa7
Compare
Run the CuTe-DSL skinny GEMM on SM80: write the per-warp partial from lane 0 instead of elect_one(), which CuTe DSL allows only on SM90+. Add A100 TP=8 plans for the Qwen3.8-Flash-Next BF16 decode linears, kept only where they beat F.linear in both hot- and cold-L2 CUDA graph replay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: kimseunghyun <incongnito12@gmail.com>
Use the lane-0 store only below SM90, through a compile-time flag set from the device capability, so SM90+ compiles the same epilogue as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: kimseunghyun <incongnito12@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: kimseunghyun <incongnito12@gmail.com>
kimseunghyun-kr
force-pushed
the
qwen4exp-sm80-skinny-plans
branch
from
November 3, 2026 12:32
3e69fa7 to
c104db8
Compare
This branch has not been deployed
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.
Overview
Adds A100 (SM80) TP=8 skinny GEMM plans for the Qwen3.8-Flash-Next BF16 decode linears. SM80 had no plans, so every decode linear used cuBLASLt, which on these shapes runs split-K plus a
splitKreducekernel. Follows #64482 and #59214.The skinny GEMM did not compile on SM80: its epilogue used
cute.arch.elect_one(), which CuTe DSL accepts only on SM90+ (CONFIG_UNSUPPORTED_ARCH 'sm_80'). Below SM90 this PR writes the per-warp partial from lane 0 instead (same meaning: one lane per warp writes its partial sum); SM90+ keepselect_one().Claims
Validation
Cold-L2 results (the sweep). Plans are kept only where they are at least 3 % faster in both hot and cold L2:
Details
Shapes and points that lose or win by less than 3 % stay on cuBLAS. Examples: QKVZ and QSA at M = 16, LM head at M ≥ 8, and the shared-expert down projection (2560, 80), which has no valid config. I also dropped final HC down at M = 4: it was 1.07x / 1.18x in the sweep but 0.91x in the validation run.
The local TP=8 shapes come from the model's projection sizes (for example, QKVZ 16384 / 8 = 2048, QSA 768 q + 768 gate + 512 replicated KV head + 640 replicated indexer Q/K = 2688).
elect_one()stays on SM90+:CuteSkinnyGemmtakesuse_elect_one, set fromcurrent_platform.has_device_capability(90), so SM90+ compiles the same epilogue as main and only SM80/SM86 use the lane-0 store. On H100, all 24QWEN4_EXP_SM90_GEMM_PLANSentries give bitwise-equal output with main and time within −0.6 % to +0.4 %.End to end: 8 x A100-40GB, TP8 + EP, MTP 3, Qwen3.8-Flash-Next-FP8, v0.32.0 CUDA 13 image with these two files mounted, MLPerf agentic dataset, 30 min per arm, A then B in one job. The start-up log confirms that the plans are used (
Warming up CuTeDSL compile_units=36 names=('shape-dynamic skinny GEMM',)). 0 failed samples in every arm.At concurrency 1 (decode M = 4 with MTP 3), both pairs agree, in both arm orders: TPOT P50 −8.3 % / −8.6 %, P95 −6.6 % / −4.2 %, output tok/s +4.9 % / +5.6 %. At concurrency 8 the change is within run-to-run noise: decode steps there are dominated by MoE, all-reduce and many small kernels. Accuracy, paired on the turns both arms scored (the benchmark's per-turn score): C1 pair 1, 239 turns, diff −0.011 (95 % bootstrap CI [−0.060, +0.038]); C1 pair 2, 233 turns, diff −0.003 (CI [−0.051, +0.045]); C8, 1,863 turns, diff +0.005 (CI [−0.017, +0.026]). All intervals include zero; generation is sampled, so 26–36 % of turns differ between any two runs. The kernel outputs match F.linear (cosine >= 0.999997, max error not above cuBLAS's).
CI: the new test runs only on SM80 with CuTe DSL; it skips elsewhere, like the SM90/SM100/SM121 tests in the same file.
Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.
🤖 Generated with Claude Code