Skip to content

[Config] Add Muse Spark Open MXFP4 FMoE tuning for gfx950 - #6593

Merged
vgokhale merged 1 commit into
ROCm:mainfrom
hongxiayang:ms-fused-moe-tune
Oct 21, 2026
Merged

vgokhale merged 1 commit into
ROCm:mainfrom
hongxiayang:ms-fused-moe-tune

Conversation

@hongxiayang

Copy link
Copy Markdown
Collaborator

Tuned and untuned TP/EP shapes for Muse Spark Open (Quark MXFP4; model_dim 4096; TP inter_dim 512 x 256 experts, EP inter_dim 4096 x 32 experts) on gfx950. Named *_fp4_tuned_fmoe.csv so the FlyDSL mxfp4 AOT glob precompiles the stage-2 layout kernels.

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

@hongxiayang
hongxiayang requested review from a team and a balanced review from Copilot October 15, 2026 17:51
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6593 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Four zero-latency entries undermine configuration selection and are skipped by normal tuning runs.

1 open finding
What changed in this PR

Adds Muse Spark Open MXFP4 FMoE tuning configurations for gfx950.

Changes:

  • Defines ten TP/EP shapes for tuning.
  • Adds kernel selections with filenames matching FlyDSL’s MXFP4 ahead-of-time compilation glob.
File Description
aiter/​configs/​model_configs/​muse-spark-open-mxfp4_fp4_untuned_fmoe.csv Defines TP/EP tuning inputs.
aiter/​configs/​model_configs/​muse-spark-open-mxfp4_fp4_tuned_fmoe.csv Records kernel selections and timing data.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

ChuanLi1101
ChuanLi1101 previously approved these changes Oct 15, 2026

@ChuanLi1101 ChuanLi1101 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Token 8/16/32/64 are us=0, so they are pinned to the 1-stage ASM kernel and a retune will skip them. Decode hits these shapes. Please confirm that is intentional.

EP only has token 1024 and 2048. Smaller EP batches fall back to the default config.

Tuned and untuned TP/EP shapes for Muse Spark Open (Quark MXFP4; model_dim 4096; TP inter_dim 512 x 256 experts, EP inter_dim 4096 x 32 experts) on gfx950. Named *_fp4_tuned_fmoe.csv so the FlyDSL mxfp4 AOT glob precompiles the stage-2 layout kernels.

TP token 8-64 (decode) use the FLAT 1-stage asm kernels. gemm_moe_tune.py does not tune per_1x32 1-stage, so their us/tflops come from op_tests/test_moe_2stage.py -q 4 -dim 4096,512 -e 256 -k 1 -t 8 16 32 64 -hip 0,0 --stage2-bias f: 14.60/20.01/30.92/46.11 us vs 34.96/39.20/49.99/65.38 us on the default 2-stage path.

Co-authored-by: Cursor <[email protected]>
Signed-off-by: Hongxia Yang <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 16, 2026 02:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review should confirm gfx950 correctness and performance evidence for the selected configurations.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@hongxiayang

Copy link
Copy Markdown
Collaborator Author

Thanks. The four FLAT 1-stage rows (token 8/16/32/64) are intentional: the token key counts routed tokens (top-8), so they cover decode batches of 1/2/4/8 per rank. gemm_moe_tune.py doesn't tune per_1x32 1-stage, so those rows had placeholder timings. They now carry measured times from op_tests/test_moe_2stage.py -q 4 -dim 4096,512 -e 256 -k 1 -t 8 16 32 64 -hip 0,0 --stage2-bias f: 14.60/20.01/30.92/46.11 µs vs 34.96/39.20/49.99/65.38 µs on the default 2-stage path. With TP8 this gave +16% serving throughput at concurrency 1–2 and +9% at 4.

EP rows only at 1024/2048 is also intentional. Under EP8, tuned rows only beat the default there (196→181 and 237→201 µs) and tied or lost at other buckets. FLAT can't be used under EP because it ignores expert_mask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants