Repository navigation
[Config] Add Muse Spark Open 816B MXFP4 fused-MoE FlyDSL configs for gfx950 (MI350P, 128 CUs) - #7109
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.
🟡 Changes recommended
All 11 new tuning rows select an unsupported FlyDSL shape, causing dispatch to discard the tuned configurations and fall back to heuristic selection.
1 open issue
What changed in this PR
This PR adds model-specific FlyDSL fused-MoE tuning entries intended to replace heuristic selection for Muse Spark Open 816B MXFP4 on MI350P (gfx950, 128 CUs) at TP4.
Changes:
- Adds 11 configurations covering token counts from 8 through 8192 with
inter_dim=1024. - Preserves existing 256-CU entries and leaves larger token counts without new configurations.
| File | Description |
|---|---|
aiter/configs/model_configs/muse-spark-open-mxfp4_fp4_tuned_fmoe.csv |
Adds 128-CU stage-one and stage-two kernel selections and tuning measurements. |
Review effort: Balanced
|
No activity for 15 days, so this is now labelled |
b15a589 to
fccf0be
Compare
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
There was a problem hiding this comment.
🟡 Changes recommended
All ten new configs are rejected by the dispatcher due to an unsupported MXMOE stage-1 shape and, independently, incompatible expert-mask handling, leaving serving and masked expert-parallel calls on the fallback.
3 open issues
Review effort: Balanced
…gfx950 (MI350P, 128 CUs) Tuned MXFP4 a4w4 fused-MoE rows for Muse-Spark-Open-816B-A42B served on 4x MI350P (gfx950, cu_num=128) with TP4 + expert parallel: 64 local experts, model_dim 4096, inter_dim 4096, topk 2, for token 8 to 16384. Tuned with csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py (the default fmoe tuner), one process per GPU. The winners are FlyDSL flydsl_moe1_afp4_wfp4 / flydsl_moe2_layout kernels, which fused_moe accepts with an expert_mask; MXMOE rows (--mxfp4-flydsl) are rejected under expert parallel. The rows need no new MXFP4 aux instances. Config only. The cu_num=256 rows in the file are unchanged. Co-Authored-By: Claude <[email protected]>
fccf0be to
9e2ce89
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The MI350P kernel-selection changes lack hardware validation tied to the reviewed head, so a human must confirm numerical correctness and latency on gfx950/128-CU hardware.
No open issues 🎉
3 resolved since last review
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The GPU kernel-selection changes require human judgment because correctness and latency under gfx950 expert parallelism were not verified on the reviewed head, and the tuning used an older aiter installation.
No open issues 🎉
Review effort: Balanced
The helper had grown to ~450 lines plus ~450 lines of tests, mostly special cases for renames, moves, multi-file groups, ambiguity and summary counts. It is an advisory hint the reviewer checks against the diff, so drop them: a tuned CSV pairs with the one untuned CSV in its folder whose name has the same tokens, and the four mismatch kinds are set differences over the rows the PR changed. Same findings on recent tuning merges (ROCm#8016, ROCm#8161, ROCm#7109, ROCm#8566, ROCm#8490); renames and moves are left to the reviewer. Also drop the triage audit plumbing for tuning_coverage.txt (A5 findings are backed through verdicts like any other rule), the .toml/tuning JSON triggers (aiter tracks no tuning .toml files) and the unrelated pre-commit change. Key columns are no longer dropped for the whole pair when one untuned cell is blank, which hid real changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>

Motivation
Serving Muse-Spark-Open-816B-A42B on 4x MI350P (gfx950, 128 CUs, PCIe) with TP4 + expert parallel,
muse-spark-open-mxfp4_fp4_tuned_fmoe.csvhas nocu_num=128rows for this layout's MoE shape, so every token count logsno tuned FlyDSL config ... using heuristic FlyDSL fallback.This replaces this PR's earlier
cu_num=128rows, which were tuned for a different parallel layout of the same model (256 experts, inter_dim 1024, topk 1) and were MXMOE rows (flydsl_mxmoe_*).fused_moerejects MXMOE rows whenever anexpert_maskis present (discarding MXMOE config: the MXMOE output_aux sort drops expert_mask), so with expert parallel they were never used.Technical Details
Shape (per rank): 64 local experts,
model_dim=4096,inter_dim=4096,topk=2, SiLU, MXFP4 activations and weights (per_1x32), g1u1. Token counts fromvllm servelogs of the served configuration.Tuned with the default fmoe tuner,
csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py(without--mxfp4-flydsl), one process per GPU. The winners are FlyDSLflydsl_moe1_afp4_wfp4_*(stage 1) +flydsl_moe2_layout_afp4_wfp4_*(stage 2), whichfused_moeaccepts with anexpert_mask:For comparison, the best MXMOE (
--mxfp4-flydsl) kernels for the same shape, which can't be used under expert parallel: 686.8 us at token 2048 and 1307.0 us at 8192, so the rows here are 18% / 8% faster at the prefill sizes.(64, 4096, 4096, 2)aux shape (the rows are used, nothing is discarded).ntcolumn is added (the file has none): with nontcolumn the tuned path usesuse_non_temporal_load = False, which is what these rows were tuned with (nt=0).cu_num=256(MI355X) rows are unchanged; only this PR'scu_num=128rows are replaced.Not a duplicate
The
cu_num=128rows are disjoint in key from the existingcu_num=256rows in the same file. No other open PR adds MI350P (128-CU) fused-MoE configs for this model. Related: #7938 adds the MXFP4 aux kernels for this shape (needed for MXMOE rows and the--mxfp4-flydsltuner); this PR does not depend on it.Test Plan
End to end on 4x MI350P, TP4 + EP4, with and without these rows (
AITER_CONFIG_FMOE= the default tables plus this file):Crossover on one 8-GPU node: GPUs 0-3 run stock then tuned, GPUs 4-7 tuned then stock, so each config is measured on both halves.
vllm bench serve --dataset-name random --ignore-eos: 4096 in / 512 out at concurrency 1 / 2 / 4 (8 x C prompts, seeds 0-2), and 32768 in / 16 out at concurrency 1 (16 prompts) for TTFT. GSM8K (lm_eval, 500 questions) with"rejection_sample_method":"block".Test Result
test_config_shape_collision: 30 passed. 10cu_num=128rows; the 28cu_num=256rows are byte-identical to the base.no tuned FlyDSL configand nodiscardingfor the shape (64 untuned lookups without them).Prefill improves by ~2%; decode is unchanged, since in this configuration most decode MoE work does not go through
fused_moe.Tuning note: the installed aiter used for tuning predates #6860, so the fix was applied locally; without it every candidate timed as 0 us.
PR Self-Review
Reviewed revision
9cdd49b
Behavior and intent
Adds 10
gfx950,cu_num=128(MI350P) rows toaiter/configs/model_configs/muse-spark-open-mxfp4_fp4_tuned_fmoe.csvfor Muse-Spark-Open-816B served with TP4 + EP4. Without them,fused_moefinds no tuned config for this layout's MoE shape and logsno tuned FlyDSL config ... using heuristic FlyDSL fallbackat every token count. The rows select non-MXMOE FlyDSL kernels (flydsl_moe1_afp4_wfp4_*+flydsl_moe2_layout_afp4_wfp4_*) becausefused_moediscards MXMOE rows when anexpert_maskis set, as it is under expert parallel. No kernel, dispatch or runtime code changes.Validation and unverified scope
This head is a merge of
maininto the branch; the CSV is unchanged since9e2ce89b2, the commit the tuning and measurements below were done for.Validated (4x MI350P, gfx950, 128 CUs; details under Test Plan / Test Result):
python3 -m pytest op_tests/tuning_tests/test_config_shape_collision.py -q: 30 passed.vllm serveTP4 + EP4 with these rows: nono tuned FlyDSL configand nodiscardinglines for the shape (64 untuned lookups without them).Unverified:
cu_num=128).err1/err2(0.9% / 1.1%) are its own checks; no separate element-wise comparison of the selected kernels against a reference was run.PR-specific question
The rows are keyed by
fused_moe's_INDEX_COLS:gfx=gfx950,cu_num=128,token∈ {8, 16, 32, 64, 128, 256, 512, 2048, 8192, 16384},model_dim=4096,inter_dim=4096,expert=64,topk=2,act_type=ActivationType.Silu,dtype=torch.bfloat16,q_dtype_a=q_dtype_w=torch.float4_e2m1fn_x2,q_type=QuantType.per_1x32,use_g1u1=1,doweight_stage1=0. That is the per-rank MoE of Muse-Spark-Open-816B (MXFP4) under TP4 + EP4 on MI350P: 64 local experts, hidden 4096, intermediate 4096, top-2.Unrelated shapes keep their selection because the diff only appends these rows: the file's 28 existing
cu_num=256rows are byte-identical tomain, no other row in the file hascu_num=128, andtest_config_shape_collision.py(30 passed) finds no key collision with the other tuned tables. A lookup with any othergfx,cu_numor shape field does not match these rows.Changed op tests
None.
AI assistance (Claude) was used to collect the shapes, run the tuning and the measurements, and write this description; a human must review every line before merge.
🤖 Generated with Claude Code