Repository navigation
[Config] [Tune] GLM-5.3-Flash TP4 bf16 and a8w8 blockscale GEMM rows for gfx950 - #7049
amd-sriram wants to merge 2 commits into
Conversation
…for gfx950 37 bf16 rows (indexer f_b/g_b N=2048 K=128, router N=160, in_proj/o_proj prefill M) and 6 a8w8 blockscale gate_up rows (N=6144 K=4096, M=1024-8192), tuned on MI355X with the GLM-5.3-Flash TP4 shapes. No shape overlaps an existing row. 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: |
NOT 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.
|
Closing. Re-measured end to end on MI355X TP4 with the rows still in this PR: no gain (-0.65% geomean over 14 points). The gain came from the dense gate_up rows, which are now in #7381. |
Summary
Adds tuned GEMM rows for GLM-5.3-Flash MXFP4 on MI355X (gfx950, 256 CUs, TP4): 37 bf16 rows and 1 a8w8 blockscale row in the existing GLM-5.3-Flash model config files. Config only.
Motivation
Several GEMM shapes of the model have no tuned row, so they take the default kernel selection. The dense FP8
gate_upat prefill sizes falls back to Triton.Changes
aiter/configs/model_configs/glm53_flash_bf16_tuned_gemm.csv: +37 rows.f_b_proj/g_b_proj(N=2048, K=128) for M = 1 to 8192.in_proj(N=6416, K=4096) ando_proj(N=4096, K=1536/2048) for prefill M.aiter/configs/model_configs/glm53_flash_a8w8_blockscale_tuned_gemm.csv: +1 row.gate_up(N=6144, K=4096) at M = 6144.model_configs/files of a family into one table and stops at load on a duplicate key.Performance (if applicable)
Kernel time per call, MI355X:
End to end, vLLM serving
amd/GLM-5.3-Flash-Quark-MXFP4, MI355X TP4, two pairs (control and test on the same node, GPU halves swapped between the pairs), 8k/1k, 60k/600 and 128k/1k at concurrency 4 to 64:TPOT is 1% to 2% lower at most points. GPQA Diamond: 0.919 with the rows, 0.909 without.
Testing
Config rows only, measured on MI355X (gfx950).
Documentation
Config rows only.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
cf43da1
Behavior and intent
GLM-5.3-Flash GEMM shapes on MI355X (gfx950, 256 CUs) that had no tuned row now pick a tuned kernel: 37 bf16 shapes (KDA f_b/g_b, in_proj, o_proj, MoE router) and the FP8 blockscale
gate_upprefill at M = 6144, which used to fall back to Triton. The other gate_up prefill sizes get their rows from #7381. Nothing else changes.Validation and unverified scope
csrc/gemm_a16w16/gemm_a16w16_tune.pyandcsrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.pyat the model's TP4 shapes. bf16 rows: 19 hipblaslt, 11 flydsl, 5 torch, 2 triton, maxerr_ratio0.012; blockscale row: 1 ck,err_ratio0.0.vllm bench serve, two control/test pairs on one MI355X node (table above): +0.51% and +1.11% geomean, GPQA Diamond 0.919 vs 0.909. That run used the original 6 gate_up rows; 5 of them now come from [Config] [Tune] GLM-5.3 a8w8 blockscale GEMM rows for gfx950 #7381 instead.model_configs/, the a8w8 blockscale config load raisesRuntimeError: Found 10 duplicate shape entries; with this head it loads and the GEMM runs. Kernel time for N=6144, K=4096, [Config] [Tune] GLM-5.3 a8w8 blockscale GEMM rows for gfx950 #7381's rows vs the dropped ones, two alternating runs each: 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; same output (cosine 0.99967 against an fp32 reference for both).cu_num=256, gfx950).PR-specific question
bf16 rows are keyed on
(gfx950, cu_num=256, M, N, K, bias, dtype, outdtype, scaleAB, bpreshuffle)and blockscale rows on(gfx950, cu_num=256, M, N, K), for the (N, K) pairs listed in Changes. Both files are already picked up by themodel_configs/merge inaiter/jit/core.py. The diff only adds lines (+38 / -0), and none of the 38 new keys exists in any tuned bf16 or a8w8 blockscale CSV on main (checked against main 551c50e), so every other shape keeps its current selection.Changed op tests
None.