Skip to content

[Config] Tune gfx1250 MiniMax-M3 PTPC GEMMs - #6717

Merged
demonsan merged 1 commit into
mainfrom
xiaobingsuper/gfx1250-minimax-m3-ptpc-tuning
Oct 21, 2026
Merged

demonsan merged 1 commit into
mainfrom
xiaobingsuper/gfx1250-minimax-m3-ptpc-tuning

Conversation

@XiaobingSuper

@XiaobingSuper XiaobingSuper commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Problem

MiniMax-M3 gfx1250 PTPC FP8 GEMMs had no model-specific tuned rows and fell back to heuristic FlyDSL tiles. In the canonical TP4 8K/1K c4 trace from LLM-Booster #217, the main fallback kernel accounts for 37.44% of rank-0 kernel time (32.96 us mean).

Change

Add 153 configurations selected by AITER's unmodified native tuner:

  • M: 1,2,4,8,16,32,48,64,128,256,512,1024,2048,4096,8192,16384,32768
  • (N,K): (768,6144), (1536,6144), (2304,6144), (2560,6144), (6144,384), (6144,768), (6144,2048), (6144,3072), (6144,6144)

The shape set is the union of the MI355 MiniMax-M3 model-specific table and the active MI455 runtime shapes. N=6144,K=128 is not included: the gfx1250 WMMA pipeline has no legal double-buffered candidate for one K tile, and it is not one of the current PTPC runtime hotspots.

This PR changes only the model-specific tuned CSV. It does not modify the FlyDSL GEMM implementation, candidate list, tuner or dispatch logic.

Controlled M=4 results

MI455X/gfx1250, 256 CUs, FlyDSL 0.4.0, BF16 output, production operator path:

Runtime shape Untuned Tuned Reduction HBM roofline efficiency
QKV (4,2304,6144) 40.85 us 6.14 us 85.0% 11.8%
O-proj (4,6144,2048) 18.20 us 4.35 us 76.1% 14.9%
gate/up (4,6144,6144) 48.60 us 7.40 us 84.8% 26.1%
down (4,6144,3072) 28.45 us 5.12 us 82.0% 18.9%

Weighted by 60 attention layers and 3 dense MLP layers, isolated M=4 PTPC latency falls from about 3.77 ms to 0.67 ms (82.3%). Controlled E2E A/B is still pending.

Roofline

MI455X reference peaks: 10.066 PFLOP/s FP8 and 19.6 TB/s HBM.

  • M=1..48 is HBM/launch-bound: median roofline efficiency is about 10-12%, with best shapes near 26%.
  • Efficiency rises with M; at M=32768 the median is 40.4% and the best shape reaches 44.5% of its compute/bandwidth roofline.
  • There is still optimization headroom, especially for narrow-N and small-M shapes, but the current change is tuning-only.

Validation

  • Full native candidate sweep; no candidate pruning or kernel changes.
  • All 153 rows selected through the merged production config.
  • All 153 production operator checks passed; no missing config, runtime error or mismatch above the tuner threshold.

@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 6717 --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.

@XiaobingSuper
XiaobingSuper force-pushed the xiaobingsuper/gfx1250-minimax-m3-ptpc-tuning branch from 1b38621 to 4d5c716 Compare October 20, 2026 13:25
@XiaobingSuper XiaobingSuper changed the title [FlyDSL] Tune gfx1250 MiniMax-M3 PTPC decode GEMMs [FlyDSL] Tune gfx1250 MiniMax-M3 PTPC GEMMs Oct 20, 2026
@XiaobingSuper
XiaobingSuper marked this pull request as ready for review October 20, 2026 13:58
@XiaobingSuper
XiaobingSuper requested review from a team and a balanced review from Copilot October 20, 2026 13:58

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot changed the title [FlyDSL] Tune gfx1250 MiniMax-M3 PTPC GEMMs [Config] Tune gfx1250 MiniMax-M3 PTPC GEMMs Oct 20, 2026
@zufayu
zufayu requested a review from demonsan October 21, 2026 01:29
@demonsan
demonsan merged commit 2dff265 into main Oct 21, 2026
@demonsan
demonsan deleted the xiaobingsuper/gfx1250-minimax-m3-ptpc-tuning branch October 21, 2026 02:26
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.

3 participants