Repository navigation
[Triton/Gluon] [Config] Tune gfx950 gemm_a8w8 for Llama 3.1 8B FP8 decode. - #7347
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
NOT READY FOR HUMAN REVIEWPR 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.
🔵 Needs a closer look
The gfx950 tile changes and four-way split-K down projection require GPU compilation, numerical-correctness, and base/head latency validation beyond the static checks performed.
No open issues 🎉
What changed in this PR
This PR adds gfx950 Triton GEMM-A8W8 configs for four Llama 3.1 8B FP8 decode GEMMs. The existing config loader selects these files without kernel or Python changes.
Changes:
- Adds shape-specific tiles for QKV, output, gate+up, and down projections.
- Sets
DEFAULT_FALLBACKand copies the defaultanyentry in each file. - Reports a combined 1.184× speedup for the four GEMMs at M=32.
| File | Description |
|---|---|
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a8w8/GEMM-A8W8-N=6144-K=4096.json |
QKV configs with M bucket bounds of 8, 16, and 32. |
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a8w8/GEMM-A8W8-N=4096-K=4096.json |
Output projection configs with M bucket bounds through 32. |
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a8w8/GEMM-A8W8-N=4096-K=14336.json |
Down projection configs through M=64, using four-way split-K. |
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a8w8/GEMM-A8W8-N=28672-K=4096.json |
Gate+up projection configs with six M bucket bounds through 256. |
Review effort: Balanced
|
@amd-jrosas LGTM! |
…code. (ROCm#7347) * [Triton] [Config] Tune gfx950 gemm_a8w8 for Llama 3.1 8B FP8 decode. * Updated configs up to M=256

Summary
Add gfx950 Triton
GEMM-A8W8shape configs for the four Llama 3.1 8B FP8 decode GEMMs. Each file covers M=8, 16, 32, 64, 128, and 256. For those buckets,gemm_a8w8loads the shape file instead ofDEFAULT.json.Motivation
These four shapes were using the family
DEFAULT.jsontile. On gfx950 that tile is slower than a shape-specific tile for gate+up, down, and output across these M values, and for QKV at M=8, 128, and 256. QKV at M=16, 32, and 64 already matchedDEFAULT.json, so those three buckets are the same tile.Changes
aiter/ops/triton/configs/gfx950/triton/gemm/gemm_a8w8/, each with M=8, 16, 32, 64, 128, 256:GEMM-A8W8-N=6144-K=4096.json(QKV)GEMM-A8W8-N=4096-K=4096.json(output)GEMM-A8W8-N=28672-K=4096.json(gate+up)GEMM-A8W8-N=4096-K=14336.json(down)DEFAULT_FALLBACKand copiesDEFAULT.json'sanyentry. M below 8 and M above 256 still useDEFAULT.json.get_gemm_config("GEMM-A8W8", M, N, K)already selectsGEMM-A8W8-N=<N>-K=<K>.json.Performance (if applicable)
gfx950. Llama 3.1 8B FP8 E4M3, per-tensor scales, one run.
gemm_a8w8, Triton backend, timed againsttorch._scaled_mm(hipBLASLt). Triton default is theDEFAULT.jsontile. Triton tuned is the tile in the new file. A ratio above 1 means that Triton is faster than hipBLASLt.Tuned Triton is faster than hipBLASLt on every row except gate+up at M=128, which is even (0.995x). The default tile loses to hipBLASLt on the larger gate+up and down shapes, and on QKV and output at M=256.
Testing
No new unit test. This PR only adds JSON configs for an existing kernel. The sweep that produced the files ran on gfx950, so MI250X and MI300X were not used.
Documentation
The loader already finds
GEMM-A8W8-N=<N>-K=<K>.jsonnext toDEFAULT.json. There is no new API.Dependencies
Breaking Changes
None. Shapes other than these four N,K pairs still resolve to
DEFAULT.json. For these four shapes, M below 8 and M above 256 still resolve toDEFAULT.json.