Skip to content

[Triton/Gluon] [Config] Tune gfx1250 Gluon MXFP4 GEMMs for Llama3 70B TP4 - #6872

Merged
azaidy merged 2 commits into
mainfrom
satya/tuning_1250_llama3_70b_gluon_tp4
Oct 27, 2026
Merged

azaidy merged 2 commits into
mainfrom
satya/tuning_1250_llama3_70b_gluon_tp4

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor
Kernel N K M main (µs) new (µs) speedup main TFLOPS new TFLOPS main TB/s new TB/s
MXFP4 preshuffle 2560 8192 4 15.40 4.75 3.25x 10.9 35.4 0.73 2.36
MXFP4 preshuffle 2560 8192 8 15.57 4.89 3.19x 21.5 68.6 0.72 2.29
MXFP4 preshuffle 2560 8192 16 15.75 4.56 3.45x 42.6 147.2 0.72 2.48
MXFP4 preshuffle 2560 8192 31 15.65 4.88 3.20x 83.1 266.2 0.73 2.34
MXFP4 preshuffle 2560 8192 32 18.23 5.06 3.61x 73.6 265.5 0.63 2.26
MXFP4 preshuffle 2560 8192 64 18.04 5.06 3.57x 148.8 530.6 0.65 2.32
MXFP4 preshuffle 2560 8192 128 17.62 6.10 2.89x 304.7 880.5 0.70 2.03
MXFP4 preshuffle 2560 8192 256 18.07 6.95 2.60x 594.2 1545.6 0.75 1.95
MXFP4 preshuffle 2560 8192 512 18.55 9.10 2.04x 1157.4 2360.9 0.86 1.76
MXFP4 preshuffle 2560 8192 1024 19.37 11.45 1.69x 2217.0 3750.4 1.08 1.82
MXFP4 preshuffle 2560 8192 2048 20.66 16.58 1.25x 4156.8 5181.8 1.48 1.84
MXFP4 preshuffle 2560 8192 4096 24.92 23.59 1.06x 6894.8 7283.0 2.00 2.12
MXFP4 preshuffle 2560 8192 8192 48.39 48.39 1.00x 7100.1 7100.1 1.83 1.83
MXFP4 preshuffle 8192 2048 4 6.06 3.78 1.60x 22.1 35.5 1.48 2.38
MXFP4 preshuffle 8192 2048 8 6.14 3.82 1.61x 43.7 70.3 1.48 2.37
MXFP4 preshuffle 8192 2048 16 6.20 3.87 1.60x 86.5 138.7 1.48 2.37
MXFP4 preshuffle 8192 2048 31 6.21 3.87 1.60x 167.4 268.6 1.52 2.44
MXFP4 preshuffle 8192 2048 32 8.47 3.92 2.16x 126.8 274.1 1.12 2.42
MXFP4 preshuffle 8192 2048 64 8.58 4.29 2.00x 250.2 501.0 1.17 2.34
MXFP4 preshuffle 8192 2048 128 8.92 4.59 1.94x 481.3 934.7 1.25 2.43
MXFP4 preshuffle 8192 2048 256 9.47 5.12 1.85x 907.2 1676.1 1.41 2.61
MXFP4 preshuffle 8192 2048 512 9.89 5.84 1.69x 1736.2 2942.3 1.80 3.06
MXFP4 preshuffle 8192 2048 1024 10.74 8.17 1.31x 3198.3 4205.6 2.50 3.28
MXFP4 preshuffle 8192 2048 2048 13.46 11.51 1.17x 5107.4 5968.3 3.32 3.88
MXFP4 preshuffle 8192 2048 4096 24.75 20.45 1.21x 5554.2 6721.1 3.25 3.94
MXFP4 preshuffle 8192 2048 8192 45.83 38.28 1.20x 5997.9 7180.5 3.32 3.97
MXFP4 preshuffle 8192 7168 4 14.64 5.08 2.88x 32.1 92.5 2.14 6.16
MXFP4 preshuffle 8192 7168 8 14.70 5.04 2.91x 63.9 186.2 2.13 6.22
MXFP4 preshuffle 8192 7168 16 14.80 5.29 2.80x 126.9 354.9 2.13 5.95
MXFP4 preshuffle 8192 7168 31 14.91 6.08 2.45x 244.1 598.7 2.13 5.23
MXFP4 preshuffle 8192 7168 32 17.31 5.61 3.09x 217.1 670.3 1.84 5.68
MXFP4 preshuffle 8192 7168 64 17.25 6.61 2.61x 435.7 1137.6 1.88 4.92
MXFP4 preshuffle 8192 7168 128 17.08 7.10 2.41x 880.1 2117.2 1.98 4.76
MXFP4 preshuffle 8192 7168 256 17.87 9.35 1.91x 1682.3 3216.9 2.03 3.89
MXFP4 preshuffle 8192 7168 512 18.57 11.49 1.62x 3238.5 5232.3 2.24 3.61
MXFP4 preshuffle 8192 7168 1024 20.82 17.63 1.18x 5777.5 6820.1 2.49 2.94
MXFP4 preshuffle 8192 7168 2048 29.85 24.71 1.21x 8056.8 9734.8 2.43 2.94
MXFP4 preshuffle 8192 7168 4096 56.19 46.65 1.20x 8561.0 10311.6 2.03 2.44
MXFP4 preshuffle 8192 7168 8192 108.34 89.72 1.21x 8880.0 10722.6 1.81 2.19
MXFP4 preshuffle 14336 8192 4 16.69 6.51 2.56x 56.3 144.4 3.75 9.61
MXFP4 preshuffle 14336 8192 8 16.80 6.68 2.51x 111.9 281.2 3.73 9.38
MXFP4 preshuffle 14336 8192 16 17.14 6.93 2.47x 219.2 542.0 3.67 9.07
MXFP4 preshuffle 14336 8192 31 17.32 9.00 1.93x 420.3 809.3 3.66 7.05
MXFP4 preshuffle 14336 8192 32 19.09 7.16 2.67x 393.6 1049.5 3.32 8.86
MXFP4 preshuffle 14336 8192 64 19.26 8.19 2.35x 780.5 1836.4 3.35 7.88
MXFP4 preshuffle 14336 8192 128 19.20 10.37 1.85x 1566.3 2898.1 3.47 6.42
MXFP4 preshuffle 14336 8192 256 20.24 12.61 1.60x 2970.5 4767.6 3.50 5.62
MXFP4 preshuffle 14336 8192 512 22.30 18.65 1.20x 5393.3 6447.2 3.56 4.25
MXFP4 preshuffle 14336 8192 1024 29.46 27.00 1.09x 8164.5 8906.4 3.27 3.56
MXFP4 preshuffle 14336 8192 2048 55.28 49.84 1.11x 8701.3 9652.4 2.35 2.61
MXFP4 preshuffle 14336 8192 4096 106.81 94.86 1.13x 9007.7 10141.9 1.85 2.08
MXFP4 preshuffle 14336 8192 8192 200.50 172.56 1.16x 9596.5 11150.7 1.66 1.93

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

@Boss2002n
Boss2002n marked this pull request as ready for review October 23, 2026 11:53
@Boss2002n
Boss2002n requested review from a team and a balanced review from Copilot October 23, 2026 11:53

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 new shape pairs lack reference-test coverage, and correctness and latency need confirmation on gfx1250 hardware.

1 open issue
What changed in this PR

This PR adds shape-specific tuning for gfx1250 Gluon preshuffled MXFP4 GEMMs used by Llama3 70B with tensor parallelism of four.

Changes:

  • Adds configurations for four (N, K) shape pairs.
  • Tunes tile sizes, warp counts, buffer counts, and CTA counts across M buckets through 8192.
  • Includes catch-all configurations and enables default fallback without changing kernel code or public APIs.
File Description
aiter/​ops/​triton/​configs/​gfx1250/​gluon/​gemm/​gemm_afp4wfp4_preshuffled/​GEMM-AFP4WFP4_PRESHUFFLED-N=8192-K=7168.json Adds tuning for N=8192, K=7168.
aiter/​ops/​triton/​configs/​gfx1250/​gluon/​gemm/​gemm_afp4wfp4_preshuffled/​GEMM-AFP4WFP4_PRESHUFFLED-N=8192-K=2048.json Adds tuning for N=8192, K=2048.
aiter/​ops/​triton/​configs/​gfx1250/​gluon/​gemm/​gemm_afp4wfp4_preshuffled/​GEMM-AFP4WFP4_PRESHUFFLED-N=2560-K=8192.json Adds tuning for N=2560, K=8192.
aiter/​ops/​triton/​configs/​gfx1250/​gluon/​gemm/​gemm_afp4wfp4_preshuffled/​GEMM-AFP4WFP4_PRESHUFFLED-N=14336-K=8192.json Adds tuning for N=14336, K=8192.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 25, 2026 23:37

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

A human reviewer must confirm correctness and the reported latency gains on gfx1250 before approving these runtime launch configs.

1 open issue

Review effort: Balanced

@zufayu
zufayu requested review from a team and azaidy October 26, 2026 01:08

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

LGTM!

@azaidy
azaidy merged commit 3897d59 into main Oct 27, 2026
71 checks passed
@azaidy
azaidy deleted the satya/tuning_1250_llama3_70b_gluon_tp4 branch October 27, 2026 13:57
cursor Bot pushed a commit that referenced this pull request Nov 26, 2026
…recision) matching Megatron-LM #6872 KDA roundings

Co-authored-by: Sealeen Zhang <[email protected]>
@cursor cursor Bot mentioned this pull request Nov 26, 2026
12 of 19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants