Repository navigation
[Triton/Gluon] [Config] gfx1151: tune gemm_a8w8_preshuffled configs - #7270
Conversation
Replace the single 'any' config of gfx1151 with per-M configs from a search on gfx1151 (Radeon 8060S), and add the N=2112 K=7168 specialized file (as on gfx950). int8 W8A8; 1.24x faster than main (geomean over 99 shape/M pairs, no pair slower). Co-Authored-By: Claude <[email protected]> Signed-off-by: Lin, KuanTing <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
WAITING ON AUTHORPR Self-ReviewRevision 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
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
There was a problem hiding this comment.
🟡 Changes recommended
The new N=2112, K=7168 configuration and automatic split-K bucket lack output correctness coverage, requiring gfx1151 int8/bf16 reference checks across M buckets, including M=257 and M=512, without a config override.
1 open issue
What changed in this PR
This PR tunes gfx1151 configurations for gemm_a8w8_preshuffled to improve int8 GEMM performance. It changes tuning data only; kernel code and public APIs stay unchanged.
Changes:
- Replaces the single default config with nine M buckets and an
anyfallback. - Adds a specialized N=2112, K=7168 config with four shape-specific bucket overrides, including split-K for 256 < M ≤ 512.
| File | Description |
|---|---|
aiter/ops/triton/configs/gfx1151/triton/gemm/gemm_a8w8_preshuffled/GEMM-A8W8_PRESHUFFLED-N=2112-K=7168.json |
Adds shape-specific tuning across ten M ranges. |
aiter/ops/triton/configs/gfx1151/triton/gemm/gemm_a8w8_preshuffled/DEFAULT.json |
Introduces per-M defaults for gfx1151. |
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
The gfx1151 GEMM retune affects all M sizes and FP8 inputs, but target-GPU correctness and latency cannot be verified in this source-only review, and FP8 latency remains explicitly unverified.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
|
Hi @farlukas, since #6951 was merged, this PR has a conflict with Would you mind sharing the reasoning behind treating gfx1151 and gfx1201 as unsupported? I want to make sure I understand the context before resolving the conflict, so this PR doesn't go against anything you intended. For context: on gfx1151 with current If there's no blocking reason for gfx1151, I'll resolve the conflict by keeping this PR's |

Summary
This PR replaces the single
anyconfig ofgemm_a8w8_preshuffledon gfx1151 with per-M configs, and adds a specialized file for N=2112 K=7168. It changes no kernel code.Motivation
On gfx1151 a single
anyconfig serves every M. A per-M search gives a higher measured int8 throughput at every M reported below.Changes
aiter/ops/triton/configs/gfx1151/triton/gemm/gemm_a8w8_preshuffled/DEFAULT.json: nineM_LEQ_*buckets,M_LEQ_8throughM_LEQ_2048, plusany. Every bucket differs from the singleanyconfig of the base tree, so every gfx1151 shape changes selection.aiter/ops/triton/configs/gfx1151/triton/gemm/gemm_a8w8_preshuffled/GEMM-A8W8_PRESHUFFLED-N=2112-K=7168.json: new file with the same ten keys. It replacesDEFAULT.jsonfor that shape; it does not merge with it. Four buckets differ:M_LEQ_64,M_LEQ_128,M_LEQ_256andM_LEQ_512.Performance (if applicable)
Beforeis the base tree0dd2716, the parent of this commit;Afteris this PR atea778ab. the two trees differ only in the two config files.6144x4096,4096x4096,28672x4096,4096x14336,4608x3584,3584x3584,37888x3584,3584x18944and2112x7168.Over all 99 shape/M pairs the geomean gain is 1.27x.
Method: torch 2.13.0+rocm7.15.0a20260728, Triton 3.8.0. The weight rotates over at least 128 MiB of copies, so each call reads the weight from memory. Each trial runs 50 iterations, and each round takes the median of 7 trials. The eleven M values come from two benchmark sessions on the same machine and environment, with the same harness: M = 1, 16, 128, 1024 and 4096 in one, and M = 8, 32, 64, 256, 512 and 2048 in the other. Each session ran head, base, base, head, and each figure is the mean of that session's two rounds. Head and base for any one M therefore come from the same session, but the 99-pair figure pools the two sessions. Taken alone the sessions give 1.268x over 45 pairs and 1.265x over 54 pairs.
No pair is slower than the base. The first round of each session alone gives 1.27x overall, and the second round 1.26x. Round-to-round spread is larger on head (median 2.0%, maximum 29.2% at M=1, 3584x3584) than on base (median 0.8%, maximum 3.3%). The slowest head round against the fastest base round still leaves no pair slower than the base, at a minimum of 1.02x.
Testing
op_tests/triton_tests/gemm/basic/test_gemm_a8w8.pyon gfx1151, both trees on the same machine and environment:0dd2716ea778abThe PR changes no test outcome. The 380 skips are the gluon cases, which need gfx950, and the preshuffle cases that the test skips on its own shape rules. Tested on gfx1151 (Radeon 8060S), which this PR targets; MI250X and MI300X read their own config directories and are unaffected. No unit test changed, because this PR adds no code path.
Documentation
The PR adds tuning data only. No API, behavior or guide text changes.
Dependencies
Breaking Changes
None.
PR Self-Review
Reviewed revision
ea778abBehavior and intent
One config serves all M values on gfx1151 today. The per-M configs give a higher measured int8 throughput at every M that this PR reports.
Validation and unverified scope
pytest op_tests/triton_tests/gemm/basic/test_gemm_a8w8.pygives 1465 passed, 380 skipped on this PR and on the base tree. The table above gives the int8 latency, and the eleven M values time all ten buckets of both files, so no bucket ships without a measurement.Unverified: fp8 latency against the base; correctness of the N=2112 K=7168 file, because no pytest shape is 2112x7168; all shapes outside the nine listed above.
PR-specific question
Only gfx1151 reads these files, so other architectures keep their previous selection. The specialized file replaces
DEFAULT.jsonfor N=2112 K=7168. Every other gfx1151 (N, K) readsDEFAULT.json, and every bucket differs from the singleanyconfig of the base tree.Changed op tests
None. This PR changes no file under
op_tests/.