Skip to content

[Triton/Gluon] [Config] [gfx1100] Add gfx1100 (RDNA3) tuned Triton A16W16 GEMM configs - #4234

Merged
azaidy merged 3 commits into
ROCm:mainfrom
WhatGhost:dev/add-gfx1100-config
Oct 16, 2026
Merged

azaidy merged 3 commits into
ROCm:mainfrom
WhatGhost:dev/add-gfx1100-config

Conversation

@WhatGhost

@WhatGhost WhatGhost commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

AITER ships tuned Triton GEMM configs for CDNA (gfx942 / gfx950) and gfx1250, but not for gfx1100 (RDNA3, e.g. Radeon PRO W7900). I ran into this while running Qwen3-14B on a W7900 with aiter enable , the config loader (get_gemm_config in aiter/ops/triton/utils/gemm_config_utils.py) requires the base {arch}-{config_name}.json to exist (fpath_should_exist=True):

AssertionError: Required config file doesn't exist: .../aiter/ops/triton/configs/gemm/gfx1100-GEMM-A16W16.json

So the Triton gemm_a16w16 path is unusable on gfx1100 / W7900.

Technical Details

So i add gfx1100-tuned A16W16 configs (tuned on a W7900, ROCm 7.2.3):

  • Base gfx1100-GEMM-A16W16.json — generic fallback (M_LEQ_4..1024 + any, NUM_KSPLIT=1, tile sizes kept within RDNA3's 64 KB LDS).
  • Per-shape configs adding for the Qwen3-14B dense linear layers' shape

Test Plan

Test Result

Submission Checklist

@WhatGhost
WhatGhost requested a review from a team July 14, 2026 09: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:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
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: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
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 4234 --add-label <label>

@zufayu
zufayu requested a review from vgokhale August 5, 2026 02:48
Ragua1 added a commit to Ragua1/aiter that referenced this pull request Sep 28, 2026
…les, add N=9216 K=3072

Signed-off-by: Martin Domanský <[email protected]>
Ragua1 added a commit to Ragua1/aiter that referenced this pull request Oct 6, 2026
Ragua1 added a commit to Ragua1/aiter that referenced this pull request Oct 6, 2026
…les, add N=9216 K=3072

Signed-off-by: Martin Domanský <[email protected]>
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

No activity for 15 days, so this is now labelled stale. A push or a comment clears it; keep-open exempts it.

@github-actions github-actions Bot added the stale The PR hasn't been updated in 2 weeks label Oct 7, 2026
@amarbarosys

Copy link
Copy Markdown

Tested this table on gfx1100 hardware (RX 7900 XTX, ROCm 7.2.4, torch 2.13.0+rocm7.2, Triton 3.7.1) against current main (2b812e5).

On current main this PR's file is no longer picked up. With aiter/ops/triton/configs/gemm/gfx1100-GEMM-A16W16.json in place, gemm_a16w16(..., backend="triton") still raises AssertionError: Required config file doesn't exist: .../configs/gfx1100/triton/gemm/gemm_a16w16/DEFAULT.json. The flat layout stopped resolving with #4948; #5961 hit the same thing for gfx1101 and moved this table to the nested path.

The table itself works well once moved to configs/gfx1100/triton/gemm/gemm_a16w16/DEFAULT.json (contents unchanged, @ e81cee8). fp16, square M=N=K, median of 50 after 10 warmup, result checked against torch.matmul:

config at the gfx1100 path 1024³ 2048³ 4096³
none (main today) fails: config file missing fails fails
gfx942 DEFAULT.json copied 8.7 TFLOPS 17.9 20.7
this PR's table, nested path 16.7 74.6 79.9

So moving the files into configs/gfx1100/triton/gemm/gemm_a16w16/ (as DEFAULT.json plus the GEMM-A16W16-N=...-K=...json files) should make the table load again and enable gemm_a16w16 on gfx1100 at roughly 4x the throughput of the CDNA config. I measured only the general table (DEFAULT.json), not the four per-shape files. Run-to-run spread on this card was up to about 20% at 2048³, so treat single numbers as approximate.

@github-actions github-actions Bot removed the stale The PR hasn't been updated in 2 weeks label Oct 11, 2026
@WhatGhost

Copy link
Copy Markdown
Contributor Author

@amarbarosys Thanks for your tests! I'll move these configs to the right place

WhatGhost and others added 3 commits October 15, 2026 04:35
Since ROCm#4948, get_gemm_config() only reads
configs/<arch>/<backend>/gemm/<d_type>/, so the flat
configs/gemm/gfx1100-GEMM-A16W16*.json files were never loaded and
gemm_a16w16 still failed on gfx1100 with "Required config file doesn't
exist: .../configs/gfx1100/triton/gemm/gemm_a16w16/DEFAULT.json".

Pure rename, file contents unchanged:
  configs/gemm/gfx1100-GEMM-A16W16.json
    -> configs/gfx1100/triton/gemm/gemm_a16w16/DEFAULT.json
  configs/gemm/gfx1100-GEMM-A16W16-N=<N>-K=<K>.json
    -> configs/gfx1100/triton/gemm/gemm_a16w16/GEMM-A16W16-N=<N>-K=<K>.json

Co-authored-by: Cursor <[email protected]>
The four N/K files only tune M_LEQ_4..M_LEQ_32. Without
"DEFAULT_FALLBACK" they replaced DEFAULT.json, so every M > 32 ran the
file's "any" tile, which is up to 2x slower than the DEFAULT.json
buckets on gfx1100 (bf16 N=7168 K=5120 M=8192: 18.9 ms vs 9.2 ms).

Write them the way the tuning scripts do: "DEFAULT_FALLBACK": true, the
tuned buckets, and a copy of DEFAULT.json's "any". The M <= 32 buckets
are unchanged. N=5120 K=17408 keeps its previous "any" tile as M_LEQ_64
and M_LEQ_128, where it measured 1.14x and 1.36x faster than
DEFAULT.json.
@WhatGhost
WhatGhost force-pushed the dev/add-gfx1100-config branch from e81cee8 to 7fa91ee Compare October 15, 2026 06:39
@github-actions github-actions Bot changed the title [gfx1100] Add gfx1100 (RDNA3) tuned Triton A16W16 GEMM configs [Triton/Gluon] [Config] [gfx1100] Add gfx1100 (RDNA3) tuned Triton A16W16 GEMM configs Oct 15, 2026
@WhatGhost

Copy link
Copy Markdown
Contributor Author

Thanks @amarbarosys for catching this and for testing it! I've moved the configs to the correct location (configs/gfx1100/triton/gemm/gemm_a16w16/), so they are picked up again on current main. I also made a small change to the four per-shape files: they now use "DEFAULT_FALLBACK": true, so M > 32 falls back to DEFAULT.json, and the tuned M ≤ 32 buckets are unchanged. Tests pass on a W7900.

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 hardware-specific settings lack split-K regression coverage and supplied gfx1100 correctness and performance results.

1 open finding
What changed in this PR

Adds gfx1100 configurations for the existing Triton A16W16 GEMM path, targeting Qwen3-14B workloads on RDNA3.

Changes:

  • Adds default configurations across M buckets.
  • Adds four shape-specific configurations with split-K settings.
File Description
aiter/​ops/​triton/​configs/​gfx1100/​triton/​gemm/​gemm_a16w16/​GEMM-A16W16-N=7168-K=5120.json Shape-specific tiles and split-K settings.
aiter/​ops/​triton/​configs/​gfx1100/​triton/​gemm/​gemm_a16w16/​GEMM-A16W16-N=5120-K=5120.json Shape-specific tiles and split-K settings.
aiter/​ops/​triton/​configs/​gfx1100/​triton/​gemm/​gemm_a16w16/​GEMM-A16W16-N=5120-K=17408.json Shape-specific settings through M=128.
aiter/​ops/​triton/​configs/​gfx1100/​triton/​gemm/​gemm_a16w16/​GEMM-A16W16-N=34816-K=5120.json Shape-specific tiles and split-K settings.
aiter/​ops/​triton/​configs/​gfx1100/​triton/​gemm/​gemm_a16w16/​DEFAULT.json General fallback configurations for gfx1100.

🧠 Review effort: Balanced


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

@azaidy
azaidy self-requested a review October 15, 2026 15:16
@azaidy azaidy self-assigned this Oct 15, 2026

@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 d753127 into ROCm:main Oct 16, 2026
Ragua1 added a commit to Ragua1/aiter that referenced this pull request Oct 19, 2026
Ragua1 added a commit to Ragua1/aiter that referenced this pull request Oct 19, 2026
…les, add N=9216 K=3072

Signed-off-by: Martin Domanský <[email protected]>
azaidy pushed a commit that referenced this pull request Oct 21, 2026
* Add gemm_a16w16 Triton config for gfx1101 (table from #4234)

Signed-off-by: Martin Domanský <[email protected]>

* Add gfx1101 gemm_a16w16 configs for four large (N, K) shapes

Signed-off-by: Martin Domanský <[email protected]>

* gfx1101 gemm_a16w16: keep #4234 bins below M 1024 in per-shape files, add N=9216 K=3072

Signed-off-by: Martin Domanský <[email protected]>

* gfx1101 gemm_a16w16: use DEFAULT_FALLBACK in the per-shape files

Each per-shape file now holds only its tuned tile, in the bucket of the M
it was measured at: M_LEQ_4096 for N=9216-K=3072, N=12288-K=3072 and
N=3072-K=12288 (M = 4096), M_LEQ_8192 for N=21504-K=3072 and
N=3072-K=15360 (M = 4608). The buckets M_LEQ_4 to M_LEQ_1024 were copies
of DEFAULT.json and now come from it through DEFAULT_FALLBACK. "any" is
the one from DEFAULT.json, as write_best_configs.py writes it. The tiles
are unchanged.

Signed-off-by: Martin Domanský <[email protected]>

---------

Signed-off-by: Martin Domanský <[email protected]>
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.

4 participants