Repository navigation
[Config] [Tune] GLM-5.3 a8w8 blockscale GEMM rows for gfx950 - #7381
Conversation
88 rows for the FP8 block-scaled attention projections of GLM-5.3 (amd/GLM-5.3-Quark-MXFP4-AttnFP8) at TP4 and TP8: fused q_a/kv_a (2624x6144), q_b and indexer wq_b (4096x2048, 2048x2048), kv_b (7168x512, 3584x512), o_proj (6144x4096, 6144x2048) and indexer wk (128x6144). Only the M of the standard grid (1..32768) that had no gfx950 row are added, so no row overlaps an existing one. Tuned on an MI355X with no other jobs on the GPUs, --libtype all; every row has errRatio 0. Signed-off-by: Sriram Kumar <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
Signed-off-by: Sriram Kumar <[email protected]> ROCm#7381 adds faster rows for the same keys (gfx950, 256, M, 6144, 4096) at M = 1024, 2048, 3072, 4096 and 8192, because GLM-5.3's o_proj has the same shape. AITER merges every model_configs/ file of a family into one table and raises on duplicate keys, so the two PRs cannot both carry them. Timed on one MI355X GPU: 38/74/79/116/199 us for ROCm#7381's rows vs 46/75/113/142/285 us for these. M = 6144 stays here.
…now has ROCm#7235 added M=16384, N=6144, K=2048 to model_configs/a8w8_blockscale_tuned_gemm_mistral_large4.csv; AITER's config load raises on a duplicate shape key across model_configs files.
|
Please also extend the untuned csv for the same shapes so if anyone wants to retune, they would get picked up. |
Adds the 77 shapes of the new tuned rows that a8w8_blockscale_untuned_gemm_glm5_3.csv did not list, so the untuned and tuned files hold the same shapes and a retune keeps them.
There was a problem hiding this comment.
🔵 Needs a closer look
The 87 gfx950 kernel selections need current-head GPU correctness and latency validation, since static checks passed but the available GPU results are author-reported from a vLLM nightly image rather than this checkout.
No open issues 🎉
What changed in this PR
Adds GLM-5.3 FP8 block-scaled GEMM tuning configurations for MI355X (gfx950, 256 CUs), using AITER’s existing model-config loading mechanism without code changes.
Changes:
- Adds 87 tuned rows: 56 CK and 31 CK-tile selections for attention projection shapes.
- Adds 77 untuned shapes, keeping the retuning list aligned with the tuned table’s 196 distinct shapes.
- Preserves existing gfx942 rows and omits the key already supplied by the Mistral Large 4 configuration.
| File | Description |
|---|---|
aiter/configs/model_configs/a8w8_blockscale_untuned_gemm_glm5_3.csv |
Adds 77 shapes for future retuning. |
aiter/configs/model_configs/a8w8_blockscale_tuned_gemm_glm5_3.csv |
Adds 87 gfx950 kernel selections for GLM-5.3 attention projections. |
Review effort: Balanced
Summary
Adds 87 tuned a8w8 blockscale GEMM rows for GLM-5.3 on MI355X (gfx950, 256 CUs) to the existing
a8w8_blockscale_tuned_gemm_glm5_3.csv. Config only.Motivation
GLM-5.3 (
amd/GLM-5.3-Quark-MXFP4-AttnFP8) runs its attention projections as FP8 block-scaled GEMMs. On gfx950 none of these shapes has a tuned row, so every call takes the default kernel. The file on main only has gfx942 (MI300A, 228 CU) rows from #6535.Changes
aiter/configs/model_configs/a8w8_blockscale_tuned_gemm_glm5_3.csv: +87 gfx950 rows (56 ck, 31 cktile), appended after the gfx942 rows.model_configs/files. Mistral's row is 216.6 us, ours 208.4 us.aiter/configs/model_configs/a8w8_blockscale_untuned_gemm_glm5_3.csv: +77 shapes, so the untuned and tuned files list the same 196 shapes and a retune keeps them (the other 10 new rows' shapes were already listed).Performance (if applicable)
End to end, vLLM nightly serving
amd/GLM-5.3-Quark-MXFP4-AttnFP8, MI355X TP4. Both arms ran on the same node and the same GPUs (0-3), one after the other. The only difference is the rows. Total token throughput, from the vLLMbench servesweep:TTFT is 10% to 15% lower at every point and TPOT 1% to 10% lower. GSM8K (200 questions, 5-shot): 0.995 with the rows, 0.99 without.
Testing
Config rows only, measured on MI355X (gfx950).
Documentation
Config rows only.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
34f0644
Behavior and intent
GLM-5.3 FP8 block-scaled GEMM shapes on MI355X (gfx950, 256 CUs) that had no tuned row now pick a tuned CK or CK-tile kernel. Nothing else changes.
Validation and unverified scope
csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py --libtype all. Every row haserrRatio0.gemm_a8w8_blockscalewith these rows, on the AITER in the vLLM nightly image, against an fp32 torch reference: cosine similarity at least 0.999 for all 88, no NaN.gfx950,cu_num=256).PR-specific question
Rows are keyed on
(gfx950, cu_num=256, M, N, K)for the (N, K) pairs listed in Changes. The file is already picked up by themodel_configs/merge inaiter/jit/core.py. The diff only adds lines (+87 tuned rows, +77 untuned shapes, -0). None of the 87 keys exists in any a8w8 blockscale CSV on main (checked against main a0bae86), and the merged table loads with AITER's own duplicate check (main's tables plus this file, on the vLLM nightly image), so every other shape keeps its current selection. The one tuned key that main now has (M=16384, N=6144, K=2048, from #7235) is not in this PR.Five keys (N=6144, K=4096, M = 1024, 2048, 3072, 4096, 8192) are also in the open draft #7049 (GLM-5.3-Flash dense
gate_up, same shape). They are dropped from #7049 (cf43da1), so the two PRs never land a duplicate key; with both files inmodel_configs/AITER's config load raisesFound 10 duplicate shape entries. Timed on one MI355X GPU, the rows here are faster or equal at all five: M=1024 38.0 vs 46.3 us, 2048 74.0 vs 75.0, 3072 79.3 vs 113.4, 4096 116.2 vs 142.3, 8192 199.0 vs 285.3, with the same output.Changed op tests
None.