Skip to content

[Perf][Qwen4Exp] Add SM100 low-latency decode GEMM plans - #59214

Merged
gau-nernst merged 4 commits into
vllm-project:mainfrom
namgyu-yun:perf/qwen4exp-sm100-ll-gemm
Oct 1, 2026
Merged

gau-nernst merged 4 commits into
vllm-project:mainfrom
namgyu-yun:perf/qwen4exp-sm100-ll-gemm

Conversation

@namgyu-yun

@namgyu-yun namgyu-yun commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Qwen4Exp's low-latency decode GEMM table has entries for SM103 and SM90 only, so on B200 (SM100) every BF16 projection falls back to cuBLAS. This adds a B200-measured table for the TP=4 shapes and routes capability (10, 0) to it, following #53534.

Test Plan

pytest tests/kernels/test_bf16_skinny_gemm.py -k qwen4_exp  # 36 passed on B200

Test Result

(N, K) M=1 M=2 M=4 M=8 M=16
(24, 2560) 5.44 → 2.02 5.22 → 2.18 5.76 → 2.24 5.76 → 2.43 5.76 → 3.42
(320, 2560) 6.08 → 2.56 7.39 → 2.62 6.27 → 2.78 6.34 → 3.26 6.30 → 4.48
(320, 10240) 7.55 → 3.87 7.68 → 4.00 7.58 → 4.93 7.68 → 6.37 -
(336, 10240) 7.74 → 3.87 7.84 → 4.03 - 7.94 → 6.37 -
(640, 2560) 6.43 → 3.07 6.59 → 3.14 6.78 → 3.49 6.59 → 4.16 -
(2560, 1536) 5.50 → 4.06 5.86 → 4.19 5.89 → 4.74 - -
(3584, 2560) 7.55 → 6.02 8.06 → 6.30 8.42 → 7.33 - -
(4096, 2560) 7.78 → 6.37 8.51 → 6.53 8.64 → 7.65 - -
(62080, 2560) 62.78 → 50.27 - - - -

The Qwen4Exp BF16 decode GEMM selector only has plans for SM103 and
SM90, so on B200 every unquantized projection falls back to cuBLAS,
which picks split-K kernels plus a separate reduce at small M. Add a
B200 table measured on SM100 and route capability (10, 0) to it.

Each point was kept only if the CuTe skinny GEMM beats cuBLAS by at
least 5% in both hot-cache and L2-flush CUDA graph replay; the winners
differ from the B300 table, so it is not reused. SM103 and SM90
selection is unchanged.

Signed-off-by: namgyu-youn <namgyu.dev@gmail.com>
@mergify mergify Bot added the qwen Related to Qwen models label Sep 29, 2026
@namgyu-yun

Copy link
Copy Markdown
Contributor Author

cc @ZJY0516 @gau-nernst working on this module. Could you look into this when you have a change?

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@gau-nernst gau-nernst left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits. Dont think some tests are needed. Also measurements should be done with flashinfer cupti cudagraph (check kernel-microbenchmark skill in vllm). U can trim the comment too (agents like verbose comment)

Signed-off-by: namgyu-youn <namgyu.dev@gmail.com>
@namgyu-yun

Copy link
Copy Markdown
Contributor Author

Some nits. Dont think some tests are needed. Also measurements should be done with flashinfer cupti cudagraph (check kernel-microbenchmark skill in vllm). U can trim the comment too (agents like verbose comment)

@gau-nernst updated (1) trimmed comment, (2) drop unneeded test, (3) measurment based on your suggestion. Could you take another look?

@gau-nernst

Copy link
Copy Markdown
Contributor

I already approved. Will need @ZJY0516 for the stamp.

@gau-nernst gau-nernst added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 1, 2026
@gau-nernst

Copy link
Copy Markdown
Contributor

/ci run

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

✅ @namgyu-youn, CI is now available for this PR.

  • /ci run starts upstream CI; /amd-ci run starts AMD CI only.
  • Your branch must contain every commit currently on its upstream target branch. Merge or rebase onto the latest target branch, then rerun the command. Append --allow-stale to a run command to test an outdated branch at your own risk.
  • /ci retry retries failed jobs in the CI build for the current PR head. If the current head has no CI build, it starts a new CI build for the current head containing only jobs that failed in the latest earlier CI build for this PR.
  • /amd-ci retry retries failed jobs in AMD CI for the current PR head. Use /amd-ci run when the current head has no AMD CI build.
  • /ci cancel cancels scheduled or running CI builds for this PR branch; /amd-ci cancel does the same for AMD CI only.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

✅ Triggered Buildkite CI #92314 for commit fdeddd23d006.

@gau-nernst
gau-nernst enabled auto-merge (squash) October 1, 2026 02:34
@gau-nernst
gau-nernst merged commit 4ed438b into vllm-project:main Oct 1, 2026
102 of 103 checks passed
@namgyu-yun
namgyu-yun deleted the perf/qwen4exp-sm100-ll-gemm branch October 1, 2026 03:51
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
…t#59214)

Signed-off-by: namgyu-youn <namgyu.dev@gmail.com>
Co-authored-by: Thien Tran <gau.nernst@yahoo.com.sg>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants