Skip to content

[Config] [Perf] MiniMax-M3.1 TP4 o_proj_full (N6144 K8192) MXFP8: 8-wave picks at M >= 8192 on gfx950 - #8578

Closed
ganyi1996ppo wants to merge 1 commit into
ROCm:mainfrom
ganyi1996ppo:ganyi/minimax-m3-oproj-8wave-rows
Closed

ganyi1996ppo wants to merge 1 commit into
ROCm:mainfrom
ganyi1996ppo:ganyi/minimax-m3-oproj-8wave-rows

Conversation

@ganyi1996ppo

@ganyi1996ppo ganyi1996ppo commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

MiniMax-M3.1 TP4 sequence-parallel prefill runs o_proj_full (N=6144, K=8192, MXFP8 1x32) through gemm_a8w8_blockscale_bpreshuffle, which reads the e8m0 mxscale table. This PR moves the 7 large-M rows of that shape (M = 8192 ... 65536) from the FlyDSL bmm kernels to the FlyDSL 8-wave MXFP8 GEMM (256x256x128). Config only, no code change. Output is bit-identical to the previous kernels.

Rows M <= 4096 are unchanged (8-wave ties at 2048/4096 and is slower below 2048, so bmm stays there).

Measurements (MI355X gfx950, 1 GPU, graph replay of 8 distinct weight copies, median, us/call)

Public API gemm_a8w8_blockscale(..., isBpreshuffled=True), old vs new table, ABAB (old/new/old/new) in one lease, aiter main 62cb8de + flydsl 0.5.3:

M old (bmm) new (8-wave) change
6144 (pads to 8192 row) 342 271 -21%
8192 358 301 -16%
12288 534 469 -12%
16384 724 599 -17%
24576 1092 906 -17%
32768 1446 1212 -16%

Padded-M lookups (M between rows) checked separately, no regression: M=4224 244 -> 188, 5120 243 -> 198, 7000 340 -> 277, 9000 453 -> 364, 20000 992 -> 773.

Correctness: relative L2 between the old-table and new-table outputs is 0.0 (bit-identical) at every M above, on random data (e4m3 weights, e8m0 scales 122..126).

Limits (stated, not hidden)

The amd_kernels ak_gemm kernel that production currently uses for this shape is still faster at M = 2048..16384 (about 21% at 2048, 28% at 4096, 20% at 6144, 10-13% at 8192-16384); at M >= 20000 this table is now at parity or faster. Closing the gap below 16384 needs a new persistent-tile kernel and is not part of this PR.

Overlap: #8191 also edits this CSV but a different shape (TP2 o_proj N6144 K4096 and qkv N4992); the rows do not overlap.

Why these rows needed re-tuning

The 19 rows for this shape (M = 1 ... 65536) come from the first version of this table (#6060, 2026-10-27) and have not been edited since (git blame). That table was tuned with the bmm kernels. The mxfp8 8-wave backend already existed then (#6407 and #6603, 2026-10-14/16), but "tune bmm and mxfp8 together" (#7439) only landed on 2026-11-04, after these rows were written. The later MiniMax commits to this table (#7411, #7498, #7829, #7772) added other shapes and did not re-tune K=8192. So the large-M rows of this shape were never compared against the mxfp8 backend, and this PR does that comparison.

Not verified: whether the October tune offered mxfp8 candidates for this shape. The ordering above is from git history only.

Review

Followed .claude/skills/review-pr by hand (no PR number existed yet; validate-kernel-pr's own run is replaced by the ABAB above). Config-only diff, 7 rows replaced, no duplicate shapes (the runtime merge's duplicate check ran on the merged table), perf claims carry an old-vs-new baseline, kernels named in the rows exist in the 8-wave pipeline for K=8192 (K % 256 == 0). No finding left open.

Technique credit: the 8-wave kernel selection follows the amd_kernels o_proj benchmarks; no amd_kernels code is used.

🤖 Generated with Claude Code

…ave picks at M >= 8192 on gfx950

Replace the 7 FlyDSL bmm rows of the 6144x8192 1x32 shape at M = 8192 ... 65536
in model_configs/minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv
with FlyDSL 8-wave MXFP8 (256x256x128) picks. Config only, no code change;
output is bit-identical to the previous kernels.

Co-Authored-By: Claude <[email protected]>
@ganyi1996ppo
ganyi1996ppo requested review from a team and a balanced review from Copilot November 24, 2026 13:46
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
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 Radeon R9700 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 8578 --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.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 9de993ee0f04 · mode shadow

Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision.

Questions to answer in the PR description

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

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

The gfx950 dispatch changes, particularly the padded large-M _ns2 split-K path, require hardware correctness and latency verification because only static checks were performed and no head-matched validation report was supplied.

No open issues 🎉

What changed in this PR

This PR tunes MiniMax-M3.1 TP4 o_proj_full MXFP8 prefill on gfx950 by changing kernel selections in the model-specific GEMM table.

Changes:

  • Switches seven rows for N=6144, K=8192, and M=8192–65536 from FlyDSL bmm to existing 8-wave MXFP8 kernels.
  • Updates recorded performance metrics while leaving rows at M≤4096 unchanged.
  • Changes configuration only; no kernel implementations or public APIs are modified.
File Description
aiter/​configs/​model_configs/​minimax_m3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv Updates seven large-M kernel selections and their performance metrics for TP4 output projection.

Review effort: Balanced

@ganyi1996ppo

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #8582: that branch carries this commit and overwrites all 7 of this PR's o_proj_full tuned rows with the persistent 4-wave kernel picks, so this change would no longer apply on its own. Further work continues in #8582.

@ganyi1996ppo

Copy link
Copy Markdown
Contributor Author

Status of the Copilot review summary 6040382791: this PR is closed and its rows are carried by #8582, where the review items are tracked. No fix is pushed here.

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.

4 participants