Repository navigation
[fix] Key GLM-5 MXFP4 EP4 fused-MoE rows on topk 9 and add prefill rows - #6392
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
🔵 Needs a closer look
Architecture-specific GPU correctness and performance require final gfx950 hardware validation.
0 open findings
What changed in this PR
Rekeys GLM-5 MXFP4 EP4 fused-MoE dispatch for shared-expert top-k 9 and adds gfx950 prefill configurations.
Changes:
- Rekeys four decode tiers from top-k 8 to 9.
- Adds 16K and 32K prefill tiers.
- Expands dispatch tests across decode, prefill, and tier fallback.
| File | Description |
|---|---|
op_tests/test_moe_glm5_fp4_ep_dispatch.py |
Verifies expected kernels and block sizes across tiers. |
aiter/configs/model_configs/glm5_fp4_untuned_fmoe.csv |
Updates tuning inputs for top-k 9 and prefill. |
aiter/configs/model_configs/glm5_fp4_tuned_fmoe.csv |
Adds corrected gfx950 dispatch rows. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@aiter-bot review |
ROCm/aiter PR #6392 — [fix] Key GLM-5 MXFP4 EP4 fused-MoE rows on topk 9 and add prefill rowsRekeys the GLM-5 MXFP4 EP4 fused-MoE config rows from topk 8 to topk 9 — the lookup key fused_moe has actually used since #5734 removed the is_ep decrement — and adds 16384/32768 prefill rows, so the tuned fp4-fused kernel pairs match again instead of falling back to the slower bf16-intermediate heuristic. Review (advisory):
|
|
Where that review came from — I ran the bot on your PR to show what it does. It is not an automatic hook; nothing reviews your PR unless somebody asks. Any reviewer on the aiter allowlist can ask for one, on any PR including their own. The trigger is a comment containing the words below — shown quoted here, because quoted lines deliberately do not trigger it:
Feedback on the review itself is welcome; it is how the rules get better. |
|
Thanks for the review. The per-layer numbers in the description come from the real EP4 |
|
@yzhou103 I added the measured timings for the 16384 and 32768 rows as you suggested. CI is green and the branch merges cleanly. Could you please approve and merge when you have a moment? Thank you! |
#5734 removed
topk -= int(is_ep)fromget_2stage_cfgs, so an EP4 rank with the shared expert fused looks uptopk_ids.shape[1]= 9 (8 routed + 1 shared). The GLM-5 MXFP4 EP4 decode rows added in #5986 are keyed65,8, so they never match on main and decode falls back to the heuristic pair, which writes BF16 and pays a second quant-sort. #5986's dispatch test passed because it callsget_2stage_cfgs(..., 65, 8, ...)directly.65,9.MI355X (gfx950, 256 CU), aiter main with and without this change: real
fused_moeat the EP4 shape (E=257, 65 local experts via expert_mask, model_dim 6144, inter_dim 2048, per-1x32 MXFP4), CUDA graph over 8 layers with distinct weights, us per layer, mean of two ABAB pairs.M = 1, 2, 4, 128 and 8192 have no row and are unchanged. Relative error against an fp32 dequant reference matches main at every M (M=12: 0.2080 vs 0.2076).
test_moe_2stage.py --no-legacyrestricted to the six rows passes its logits_diff check.End to end, GLM-5.3 MXFP4 TP4/EP4 agentic replay on the SGLang 0.5.21 image (CONC 10, 1 h): P50 interactivity +2.3% [-0.3, +4.7] over stock, GSM8K 0.9750 for both.
Only GLM-5-family MXFP4 models with EP4 and fused shared experts on gfx950 reach these keys.