config(glm5): retune MXFP4 MoE token=8 to a4w4 - #4798
Merged
Conversation
Follow-up to ROCm#4266: neighboring tokens already use flydsl_mxmoe a4w4, but token=8 remained on afp4/mfma. Retuned with gemm_moe_tune.py --mxfp4-flydsl on MI355X (gfx950). Non-MTP decode c8 MoE ~1.9 ms and wall ~1.8 ms faster vs mfma baseline. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GLM-5 FP4 tuned fused-MoE configuration for gfx950 by switching the token=8, model_dim=6144, inter_dim=512 shape from the prior afp4/mfma MoE kernels to the tuned flydsl_mxmoe a4w4 kernels, aligning it with other nearby token shapes already on a4w4.
Changes:
- Replace the gfx950
token=8, inter_dim=512entry’s kernel selection withflydsl_mxmoe_g1_a4w4_16x256x256_f16in_nt+flydsl_mxmoe_g2_a4w4_16x256x256_atomic. - Update the recorded
ustiming for that shape to68.581(and corresponding fields consistent with existing mxmoe rows).
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
yzhou103
reviewed
Aug 18, 2026
yzhou103
approved these changes
Aug 18, 2026
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.
Summary
glm5_fp4_tuned_fmoe.csvalready moved severalinter_dim=512tokens toflydsl_mxmoea4w4, but token=8 was still on afp4/mfma. Non-MTP decode c8 (nextPow2(8)=8) hit that slow path.gemm_moe_tune.py --mxfp4-flydslon MI355X (gfx950).flydsl_mxmoe_g1_a4w4_16x256x256_f16in_nt+flydsl_mxmoe_g2_a4w4_16x256x256_atomic(block_m=16, coupledus=68.581).Selected kernels (token=8,
6144×512, E=257, topk=9)Confirmed via
fused_moelog on all three serving shapes below.flydsl_moe1_afp4_wfp4_bf16_t32x32x256_w3_xcd4_kw4_fp4flydsl_mxmoe_g1_a4w4_16x256x256_f16in_ntflydsl_moe2_afp4_wfp4_bf16_t32x128x256_reduce_bnt2flydsl_mxmoe_g2_a4w4_16x256x256_atomicServing A/B (MI355X TP4, GLM-5.2-MXFP4, non-MTP, c8)
Recipe:
max-running-requests=8, DSA triton, kv fp8,SGLANG_ROCM_FUSED_DECODE_MLA=0,ROCM_QUICK_REDUCE_QUANTIZATION=INT4,SGLANG_OPT_USE_TOPK_V2=0.Decode-heavy 1k/8k show the largest gain; 70k is flatter because attention/prefill dominate, but TPOT still improves.
Decode profile (TP-0, c8, 20 steps; earlier A/B)
mfma-class)flydsl_mxmoe_*_a4w4_*Test plan
rm -f /tmp/aiter_configs/tuned_fmoe.csv; restart SGLang with/withoutAITER_CONFIG_FMOEoverridefused_moeselects a4w4 for(..., 8, 6144, 512, ...)