Repository navigation
[FusedMoE] Ergo: gate-only ReLU² MXFP4 experts with per-expert output RMSNorm (H8192 I4096 E32 top8) - #30
Open
andyluo7 wants to merge 1 commit into
Open
[FusedMoE] Ergo: gate-only ReLU² MXFP4 experts with per-expert output RMSNorm (H8192 I4096 E32 top8)#30andyluo7 wants to merge 1 commit into
andyluo7 wants to merge 1 commit into
Conversation
…192 I4096 E32 top8 `moe/mxfp4_relu2_norm_h8192_i4096_e32_top8`: one expert-parallel rank's routed experts of Amazon Ergo (256 experts, top 8, 32 local): MXFP8 x MXFP4 gate-only GEMM1 with ReLU² and MXFP8 requant in the epilogue, an unweighted GEMM2, and a combine that RMS-normalizes each slot with its expert's scale before the route-weighted sum in slot order. One launch after the sort; no output atomics. Adapted from moe/mxfp4_h5120_i2304_e48_top6. Co-Authored-By: Claude <noreply@anthropic.com>
andyluo7
added a commit
to andyluo7/ergo
that referenced
this pull request
Dec 2, 2026
- Dockerfile: amd-kernels at 1a3889b (andyluo7/amd-kernels pr-ergo-fused-ep, Inferact/amd-kernels#30 and #31), with the fused EP tile table swept for Ergo's shapes. - DP8+EP8 with FUSED_EP=1: 186 / 5,627 / 12,432 / 17,459 tok/s at 1 / 64 / 256 / 512 concurrent requests (+5-7% from 64 over the previous tiles), GSM8K 97.6%. Co-Authored-By: Claude <noreply@anthropic.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.
Summary
A new FlyDSL kernel package,
moe/mxfp4_relu2_norm_h8192_i4096_e32_top8. It holds the routed experts of one expert-parallel rank of Amazon Ergo: 256 experts, top 8, 32 local experts, H 8192, I 4096, MXFP4 weights.Ergo's experts differ from the other MoE entries in two ways:
act = relu(x @ w1.T)^2.What it does. Two launches: the sort, then GEMM1 + GEMM2 + combine.
bf16(y * rsqrt(mean(y^2) + eps) * scale[e])). It then sums the 8 route-weighted slots in slot order, in fp32, with one rounding.Weights and determinism. Weights are read in AITER's
shuffle_weight_a16w4/shuffle_scale_a16w4layouts (gate_up=False), so a serving stack's AITER-shuffled MXFP4 tensors work without a copy. There are no output atomics, and runs are bitwise repeatable.Origin. Adapted from
moe/mxfp4_h5120_i2304_e48_top6. Changes: gate-only GEMM1 with ReLU², an unweighted GEMM2, and the normalizing combine. The tile table is swept per token count (sweep_dispatch.py).Performance
Setup: one MI350X, one TP8 + EP8 rank (about one route in eight is local), bf16 tokens, graph replay, median µs per call.
From T 64, most of the 1 GB of local expert weights is read once per call, so the kernel is bound by the HBM weight stream.
End to end. In vLLM (Ergo on 8x MI350X, TP8 + EP8, DSpark speculative decoding) this entry replaces the ROCm MoE path's per-route stages and the separate per-expert-norm finalize. Output throughput went up 7–13% at 1 to 256 concurrent requests, and GSM8K stayed at 97.5%.
Tests
The tests check the following on MI350X:
out=buffer (as vLLM calls it): it warms up every tier and nothing compiles afterwards.A follow-up PR adds the fused expert-parallel layer for the same experts. It uses this entry as its staged baseline.
🤖 Generated with Claude Code