Repository navigation
[HIP] [Feature] Add routed GLM-5.2 TP4 MXFP4 MoE shape - #5451
pbkowalski wants to merge 2 commits into
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags & labels: |
There was a problem hiding this comment.
should not add a completely new test only for a new instance. test could be added to existing ones possibly.
There was a problem hiding this comment.
Removed the one-off test file and folded the routed-shape output_aux coverage into op_tests/test_moe_sorting.py.
Signed-off-by: Pawel Kowalski <pawel.kowalski@silo.ai>
cb9aaa8 to
c7abb5c
Compare
|
Advisory review (static + hand-run; not a merge gate). Validation/Perf ran no GPU stage — reasons are on their lines below. Findings tagged Adds the routed-only GLM-5.2 TP4 MoE shape (256 experts, top-k 8, H=6144, INTER=512) to the MXFP4 MoE aux-kernel codegen, five gfx950 tuned decode rows for it, and an output_aux sorting test. Review (advisory): 🔴 HIGH RISK 🔴 [verified] gen_instances.py adds (256,6144,512,8) to the codegen SHAPES, but on the current merge target the hand-maintained Python mirror
📝 [inferred] The routed rows cover only token buckets 2/4/16/32/64 while the existing shared-expert (257,9) rows in glm5_fp4_tuned_fmoe.csv cover all 16 buckets 1..32768 — a routed decode at token=1 or 8, or any prefill bucket, finds no row, and on the dedicated config-file path aiter/fused_moe.py:3040 raises NotImplementedError for a missing exact row (the token-tier fallback in 📝 [verified] The new test in op_tests/test_moe_sorting.py runs at BLOCK_SIZE_M=32, which dispatches to the threestage instance 📝 Two structural AI-code checks fired (the reused compare helper was not adapted to the new 7-element output; the PR's test claim does not match what the shipped code does, and the documented command is invalid as written) — elevated AI code risk on top of the stale rebase. Reviewer should ask for the actual run log of the documented test command and the serving sweep before approving the rebase. |
|
No activity for 15 days, so this is now labelled |
[Feature] Add routed GLM-5.2 TP4 MXFP4 MoE shape
Summary
Add the routed-only GLM-5.2 TP4 shape to the MXFP4 MoE auxiliary generator and
provide tuned decode configurations for gfx950.
Motivation
GLM-5.2 has 256 routed experts and one shared expert. When the shared expert is
run separately, the MXFP4 MoE call uses 256 experts, top-k 8, hidden size 6,144,
and intermediate size 512.
AITER currently generates the auxiliary sorting code for the combined
257-expert, top-k 9 shape, but not for this routed-only shape. It also has no
matching decode rows in the GLM-5.2 MXFP4 tuning table.
Changes
(256, 6144, 512, 8)to the MXFP4 MoE auxiliary generator.tuning.
output_auxcheck for the routedshape.
Performance
Hardware: AMD MI355X, GLM-5.2-MXFP4, TP4.
With the shared expert run separately, output throughput changed as follows:
At 60k input and concurrency 64, throughput was unchanged within measurement
noise: 181.3 before and 181.2 after.
Testing
experts and top-k 8, then checks token IDs, expert IDs, row indices, weights,
and the output buffer.
rows.
needle-in-a-haystack tests.
Documentation
No user-facing documentation changes are needed.
Dependencies
No new dependencies.
Breaking Changes
None.