Repository navigation
[Config] Add gfx950 a8w8_blockscale tunings for GLM-5.3 shapes (13-61% on low M) - #5278
stefanskiasan wants to merge 1 commit into
Conversation
The GLM-5.3 projection shapes (N=6144 with K=3072/4096/6144, plus
N=2624/K=6144) have no gfx950 entries in a8w8_blockscale_tuned_gemm.csv,
so they fall back to an untuned config. On MI355X that lands at roughly
19.9 us and 1900 GB/s for M<=32.
Tuned with the project's own tuner:
gemm_a8w8_blockscale_tune.py --libtype all --splitK --compare \
--update_improved --min_improvement_pct 3 --mp 4
All 24 low-M shapes improved by 13-61 %; (1, 6144, 6144) goes from
20.67 us to 11.00 us and 1900 -> 3458 GB/s. The winning configs use
splitK=3: at NPerBlock=64 and N=6144 only 96 workgroups are launched on
256 CUs, so splitting K is what fills the machine.
A second sweep over M=48..512 is included; there the effect fades as
expected once there is enough work (only 14 of 32 shapes improved by the
3 % threshold, and at N=6144/K=6144 only M=48 and M=64).
End to end in vLLM (TP4, GLM-5.3 MXFP4 + fp8 attention), single-stream
decode went from 171.3 to 184.7 tok/s, GSM8K unchanged at 148/150.
Related: ROCm#5277, which is about splitK not being searched by default.
Signed-off-by: Asan Stefanski <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
There was a problem hiding this comment.
🟢 Approval recommended
The change is a straightforward addition of new, non-duplicative tuning rows in the existing CSV schema with no functional code-path modifications.
Pull request overview
Adds tuned gfx950 configurations to AITER’s a8w8 blockscale GEMM tuning table to improve performance for GLM-5.3 projection shapes (notably low-M cases) by enabling better split-K selections where beneficial.
Changes:
- Appends 38 new
gfx950rows to the blockscale tuned GEMM CSV for GLM-5.3-relevant (M, N, K) shapes. - Introduces split-K>0 configurations for low-M shapes (including
splitK=3winners) to address under-parallelization atN=6144.
File summaries
| File | Description |
|---|---|
| aiter/configs/a8w8_blockscale_tuned_gemm.csv | Adds gfx950 tuned entries for GLM-5.3 projection shapes to improve low-M performance via split-K-capable configs. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
No activity for 15 days, so this is now labelled |
|
No activity for 15 days, so this is now labelled |
|
This PR conflicts with current |
|
@aiter-bot review |
|
aiter-bot — queued behind 31 review(s); expect to start in about 4.8 h. The box reviews one PR at a time. |
aiter-bot
left a comment
There was a problem hiding this comment.
ROCm/aiter PR #5278 — [Config] Add gfx950 a8w8_blockscale tunings for GLM-5.3 shapes (13-61% on low M)
Review (advisory): 🔴 HIGH RISK
Validation (deterministic): NOT RUN — the PR changes runtime code but ships no test target; the changed path is loaded at run time (aiter/jit/core.py reads this CSV on every a8w8 blockscale GEMM config lookup), so the applicable repo check is the collision guard op_tests/tuning_tests/test_config_shape_collision — the one the maintainer asked to be re-run — not an op test target
Perf (advisory): NOT RUN — no perf target: the PR changes runtime code but ships no test target; the 38 rows are byte-identical to rows already on main (landed by #5602), so a head-vs-base measurement would show no delta by construction
Size: 38 lines / 1 files
Design (advisory): append the GLM-5.3 gfx950 tunings to the canonical a8w8_blockscale_tuned_gemm.csv rather than a model_configs/a8w8_blockscale_tuned_gemm.csv sibling — overruled by demonsan on 2026-11-30, and moot besides: #5602 already landed these 38 rows in the canonical table
Human: recommend jamesETsmith review whether PR #5278 should close as superseded by #5602, which landed these 38 rows byte-identical on main, and where GLM-5.3 rows belong given that moving them to a model_configs sibling while the canonical table keeps them collides at runtime
🔴 [verified] All 38 rows added to aiter/configs/a8w8_blockscale_tuned_gemm.csv are already on main byte-identical — commit 9f9cc3a (#5602, 2026-09-20) landed the same rows — so any rebase that keeps them duplicates the (gfx, cu_num, M, N, K) key 38 times and the runtime config merge raises RuntimeError: Found 76 duplicate shape entries during merge of 'a8w8_blockscale_tuned_gemm' on the first a8w8 blockscale GEMM lookup (reproduced by driving AITER_CONFIGS.get_config_file over a sandbox copy of main's configs, both for rows re-appended to the canonical CSV and for rows moved into a model_configs/a8w8_blockscale_tuned_gemm.csv file as demonsan requested on 2026-11-30 — main's canonical table keeps them either way, and the collision guard runs only on a daily schedule, never in PR CI). Author must close the PR as superseded, or rebase it to an empty diff — the three-way merge against main resolves to exactly main's file — rather than follow the move-to-model-config instruction as written, which breaks every GLM-5.3 a8w8 blockscale GEMM at config lookup.
What
Adds 38 gfx950 entries to
a8w8_blockscale_tuned_gemm.csvfor the GLM-5.3projection shapes:
N=6144withK=3072/4096/6144, plusN=2624/K=6144,over
M=1..512.These shapes currently have no gfx950 entries at all in that table
(
awk -F, '$1=="gfx950" && $4==6144 && $5==6144' ... | wc -l→ 0), so they takean untuned fallback. On MI355X that lands at roughly 19.9 µs and 1900 GB/s for
M≤32.
How they were measured
The project's own tuner, on an otherwise idle MI355X (256 CUs):
--compare --update_improvedmeans a row is only taken when it beats theexisting one by ≥3 %, so this cannot regress a shape that was already good.
Results
All 24 low-M shapes improved, none regressed:
Bandwidth on (1, 6144, 6144): 1900 → 3458 GB/s. The winning configs use
splitK=3, which is the expected mechanism: atNPerBlock=64and N=6144 only96 workgroups are launched on 256 CUs, while the same kernel config reaches
5140 GB/s at N=36864 (576 workgroups). It is a parallelism shortfall, and
splitting K is what fills the machine.
A second sweep over M=48…512 is included. There the effect fades as expected
once there is enough work: only 14 of 32 shapes cleared the 3 % threshold, and
at N=6144/K=6144 only M=48 (−16.8 %) and M=64 (−4.7 %). From roughly M≥72 splitK
no longer helps.
End to end
vLLM TP4, GLM-5.3 (MXFP4 experts + fp8 attention), MI355X:
Related
#5277 — the reason these shapes look the way they do is that
--splitKis astore_truewith no default, so the shipped tables were generated without it:6569 of 6630 gfx950 rows in this file carry
splitK=0. This PR fixes the GLM-5.3shapes; the broader question of re-tuning with splitK enabled is in that issue.