[GLM5.2] Add GLM5.2-FP8 PTPC GEMM & MoE tuned configs - #4236
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
qichu-yun
force-pushed
the
mi308_tune
branch
2 times, most recently
from
July 15, 2026 03:18
21d811b to
c7eb45e
Compare
yifehuan
reviewed
Jul 15, 2026
…ared shapes
Add GLM-5.2-FP8 GEMM tuning for MI308 (gfx942, 80 CU): a new ptpc config
(a8w8_bpreshuffle) plus gfx942 entries added to the existing GLM-5.2
block-scale (a8w8_blockscale_bpreshuffle) and bf16 model configs under
aiter/configs/model_configs/.
At load time aiter merges every model_configs/*<op>_tuned_gemm*.csv with the
base config and de-duplicates on (gfx, cu_num, M, N, K[, q_dtype_w]); a shape
key present in more than one file makes the loader rewrite the source CSVs and
raise "please re-run". The new gfx942/cu80 entries shared keys with three
existing files, all resolved so each key lives in exactly one file:
- qwen3.5_397b (a8w8_blockscale_bpreshuffle, N=4096/K=2048, 16 M): kept the
existing entry for the 8 shapes with an identical kernel; for the other 8,
kept the GLM-5.2 entry and dropped it from qwen3.5_397b. Measured on this
MI308 the GLM-5.2 kernel is faster for all 8 (e.g. M=128 13.7us vs 19.3us,
M=2048 123us vs 146us). The qwen3.5_397b gfx942/cu80 us values there imply
throughput above the MI308X (80 CU) FP8 ceiling, so they are not
representative of an 80-CU part.
- dsv3 (a8w8_bpreshuffle, N=6144/K=1536, 19 M): kept dsv3 for the 5 shapes
with an identical kernel; for the other 14, kept the GLM-5.2 entry. Measured
on this MI308 the GLM-5.2 kernel is much faster at large M (e.g. M=4096
198us vs 322us, M=32768 1468us vs 2428us) and within noise at small M.
- dsv4 (a8w8_blockscale_bpreshuffle, N=4096/K=2048, 4 M): kept dsv4 for the
2 shapes with an identical kernel (M=48, 768); for M=384 and M=1536 kept
the GLM-5.2 (MI308-tuned) entry and dropped it from dsv4.
gfx950 rows in the existing GLM-5.2 files are left unchanged. No duplicate
shape keys remain on gfx942/cu80 after this change.
Signed-off-by: Chen Yi-Jun (Eveline) <yijuchen@amd.com>
1 task
Raiden-Makoto
pushed a commit
to Raiden-Makoto/aiter
that referenced
this pull request
Jul 20, 2026
…ig (gfx950) Adds tuned a8w8_blockscale_bpreshuffle configs for GLM-5.2's o_proj (N=6144, K=4096) on gfx950 — the one 128-aligned MLA dense-projection shape missing from the GLM5 block-scale configs merged in ROCm#4236 (which covers q_b_proj 4096,2048 and other GLM5 shapes but not o_proj 6144,4096). Config coverage only, no code changes; merges via the existing *a8w8_blockscale_bpreshuffle_tuned_gemm*.csv glob. 60 rows, gfx950/cu_num=256, M = prefill (1024-65536) + decode/cuda-graph (1-512).
3 tasks
yifehuan
pushed a commit
that referenced
this pull request
Jul 21, 2026
…ig (gfx950) (#4243) Adds tuned a8w8_blockscale_bpreshuffle configs for GLM-5.2's o_proj (N=6144, K=4096) on gfx950 — the one 128-aligned MLA dense-projection shape missing from the GLM5 block-scale configs merged in #4236 (which covers q_b_proj 4096,2048 and other GLM5 shapes but not o_proj 6144,4096). Config coverage only, no code changes; merges via the existing *a8w8_blockscale_bpreshuffle_tuned_gemm*.csv glob. 60 rows, gfx950/cu_num=256, M = prefill (1024-65536) + decode/cuda-graph (1-512). Co-authored-by: Raiden-Makoto <raidenmakoto916@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Add tuned configs for the GLM-5.2-FP8 PTPC online-quant TP8 scenario on gfx942, so the runtime can use tuned MoE and GEMM configs instead of falling back to defaults.
Technical Details
Adds GLM-5.2 model-specific tuned/untuned configs under aiter/configs/model_configs/:
The MoE rows cover model_dim=6144, inter_dim=256, expert=257, topk=9, ActivationType.Silu, and QuantType.per_Token FP8 A/W.
Test Plan
Test Result
Submission Checklist