Skip to content

[ROCm][Perf] Fix wvSplitK tile choice for N>=5 on gfx950 and add N=6 - #62846

Closed
jiacao-amd wants to merge 1 commit into
vllm-project:mainfrom
jiacao-amd:rocm-wvsplitk-n5-wide-gfx950
Closed

jiacao-amd wants to merge 1 commit into
vllm-project:mainfrom
jiacao-amd:rocm-wvsplitk-n5-wide-gfx950

Conversation

@jiacao-amd

@jiacao-amd jiacao-amd commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

On gfx950, wvSplitK picks YTILE 3 or 4 for wide outputs. Once N >= 5 those tiles are up to 4x slower than YTILE 2, so N=5 fell behind hipBLASLt on shapes like an LM head shard (e.g. the draft/target LM head under EAGLE with K=3 and 5 rows).

This PR:

  • uses YTILE 2 for N >= 5 on gfx950 (N <= 4 and other GPUs are unchanged);
  • lets gfx950 run N=6 through wvSplitK where it beats hipBLASLt (M > 1024, 2048 <= K <= 8192).

Kernel results (MI355X, bf16, µs per call, CUDA graph over rotating weights)

LM head shard M=50016, K=6144:

N hipBLASLt wvSplitK before wvSplitK after
4 129.9 103.0 103.0
5 129.4 385.8 95.1
6 123.7 — (hipBLASLt) 98.1

Over a 630-shape grid (M 16–100032, K 512–16384, N 1–6):

  • N=5: 35% faster than before on average (geomean), 42/105 shapes more than 20% faster, none slower beyond noise.
  • N=6 in the enabled range: 13% faster than hipBLASLt on average (geomean), worst case +7% at M=100032 where both are bandwidth bound.
  • N <= 4: unchanged.
  • N=7/8 beat hipBLASLt on only part of the grid and stay on hipBLASLt.

Max relative error vs an fp32 reference: 0.4%.

E2E (MI355X, MiniMax-M3-MXFP4, TP4, EAGLE3 K=3)

vLLM nightly 8e2beaa3 (AITER v0.1.26) plus #61889, which that nightly needs to start MiniMax-M3; the baseline is the same image without this PR. AgenticX: InferenceX recipe minimaxm3/vllm/mi355x-fp4-mtp/agentic.yaml, 3600 s per point, one run each (run-to-run noise is about ±3%). Cells are baseline → this PR.

AgenticX (selected points; also measured: the previous revision at TP2 C1–C16)

Conc Throughput/GPU (tok/s) P50 interactivity P90 interactivity Mean TPOT P90 TTFT
20 33,664 → 33,891 (+0.7%) 201.3 → 205.0 (+1.8%) 129.8 → 128.4 (−1.1%) 5.57 → 5.43 ms (−2.5%) 1.14 → 1.06 s (−6.4%)
24 40,256 → 40,332 (+0.2%) 169.9 → 170.7 (+0.4%) 97.5 → 98.1 (+0.6%) 6.80 → 6.72 ms (−1.2%) 1.19 → 1.14 s (−4.0%)

The change applies when the draft LM head runs with 5 or 6 rows, about a quarter of the time at C20–C24 and less at higher concurrency, which matches the 1–2.5% lower TPOT.

Accuracy (GSM8K), InferenceX gsm8k.yaml, 5-shot, all 1,319 questions, real EAGLE3 acceptance, thinking on:

strict-match flexible-extract
baseline 96.21% 96.13%
this PR 95.91% 95.83%

Standard error ±0.53%.

Test plan

  • tests/model_executor/layers/test_rocm_unquantized_gemm.py: new dispatch cases for N=5/6/7 on gfx950 and other gfx9 (42 passed, 2 skipped on MI355X).
  • Kernel timing and accuracy over the grid above, old vs new wvSplitK and hipBLASLt.

🤖 Generated with Claude Code

@mergify mergify Bot added the rocm Related to AMD ROCm label Oct 21, 2026
@github-project-automation github-project-automation Bot moved this to Todo in AMD Oct 21, 2026
On gfx950 the YTILE 3/4 tiles picked for wide outputs are up to 4x slower
than YTILE 2 once N >= 5 (386 vs 95 us for an LM head shard, M=50016,
K=6144, N=5), which made N=5 slower than hipBLASLt. Use YTILE 2 there, and
let gfx950 also run N=6 on the shapes where it beats hipBLASLt.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: jiacao-amd <jiahui.cao@amd.com>
@jiacao-amd
jiacao-amd force-pushed the rocm-wvsplitk-n5-wide-gfx950 branch from b3e04a5 to 3df228c Compare October 21, 2026 21:13
@jiacao-amd jiacao-amd changed the title [ROCm][Perf] Skip wvSplitK's N=5 kernel on wide outputs on gfx950 [ROCm][Perf] Fix wvSplitK tile choice for N>=5 on gfx950 and add N=6 Oct 21, 2026
@jiacao-amd

Copy link
Copy Markdown
Contributor Author

Closing: on MiniMax-M3.1-Flash (the target now) decode batches never hit the N=5/6 wvSplitK path, and the related lm_head dispatch change measured only ~0.6% end to end.

@jiacao-amd jiacao-amd closed this Oct 25, 2026
@github-project-automation github-project-automation Bot moved this from Todo to Done in AMD Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rocm Related to AMD ROCm

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant