Repository navigation
[Triton/Gluon] [Config] [gfx1201] Add gfx1201 GEMM A8W8 tuning configs - #6245
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
the performance numbers that shows improvements at vllm's side from an end2end serving perspective. vllm-project/vllm#60672. |
There was a problem hiding this comment.
🔵 Needs a closer look
The configurations are structurally consistent, but their hardware-specific correctness and performance require final gfx1201 validation.
0 open findings
What changed in this PR
Adds gfx1201 Triton FP8 GEMM tuning for Gemma-4 12B TP1/TP2 projection shapes.
Changes:
- Adds 11 shape-specific A8W8 configurations.
- Tunes 16 M bounds plus fallback per shape.
- Includes split-K configurations for selected workloads.
| File | Description |
|---|---|
GEMM-A8W8-N=9216-K=3840.json |
Global QKV TP1 tuning. |
GEMM-A8W8-N=8192-K=3840.json |
Sliding QKV TP1 tuning. |
GEMM-A8W8-N=5120-K=3840.json |
Global QKV TP2 tuning. |
GEMM-A8W8-N=4096-K=3840.json |
Sliding QKV TP2 tuning. |
GEMM-A8W8-N=3840-K=8192.json |
Global output TP1 tuning. |
GEMM-A8W8-N=3840-K=7680.json |
Down projection TP2 tuning. |
GEMM-A8W8-N=3840-K=4096.json |
Shared output tuning. |
GEMM-A8W8-N=3840-K=2048.json |
Sliding output TP2 tuning. |
GEMM-A8W8-N=3840-K=15360.json |
Down projection TP1 tuning. |
GEMM-A8W8-N=30720-K=3840.json |
Fused gate/up TP1 tuning. |
GEMM-A8W8-N=15360-K=3840.json |
Fused gate/up TP2 tuning. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Motivation
Add tuned gfx1201 GEMM A8W8 configurations for
RedHatAI/gemma-4-12B-it-FP8-Dynamicat tensor parallel sizes 1 and 2 on AMD Radeon AI PRO R9700 GPUs.Across all 176 explicit M/N/K cases covered by this PR, the submitted configurations achieve a 1.61× geometric-mean GEMM speedup over AITER's default untuned configuration.
Technical Details
Add 11 shape-specific JSON files under
aiter/ops/triton/configs/gfx1201/triton/gemm/gemm_a8w8/, covering the model's QKV, attention output, fused gate/up, and down projections. Shapes were derived from all 48 decoder layers, including the replicated global KV head at TP2.Each file defines 16
M_BOUNDS/M_LEQ_*configurations for M=1–32768 in powers of two, plus ananyfallback. The shared (3840, 4096) shape gives 11 unique N/K pairs and 176 explicit cases. Every submitted configuration matches its stored tuning winner.Test Plan
op_tests/triton_tests/gemm/basic/test_gemm_a8w8.pyon gfx1201.test_gemm_fp8("fp8e4m3", M, N, K, "triton")correctness test for every submitted explicit case, and assert config lookup selects the submitted configuration.gemm_a8w8operation using the defaultDEFAULT.jsonconfiguration versus the tuning winner, with identical inputs and BF16 output within each pair.Test Result
Correctness validation on ROCm 10.0.0, PyTorch 2.13.0, and Triton 3.8.0:
atol=0.02,rtol=0.01).Tuning performance against default untuned AITER:
Speedup is default latency / tuned latency, aggregated as an unweighted geometric mean over unique cases. The shared TP1/TP2 shape is counted once. Tuned latency was lower in 176/176 measured cases, with individual speedups of 1.0007×–2.3311×.
Each case uses CUDA graph timing with hot operands, five randomized interleaved comparison rounds, and the median latency for each configuration (
rep=10 msper round). Measurements cover GEMM and scaling; input quantization, attention, and tensor-parallel communication are excluded.The table combines 139 cases measured on ROCm 10 (PyTorch 2.13.0, Triton 3.8.0; 1.72× geometric-mean speedup) with 37 cases retained from ROCm 7.2.3 (1.26×). Default and tuned timings for each case use the same runtime. The retained winners were revalidated for correctness on ROCm 10, but their default/tuned performance comparison was not rerun there.
Submission Checklist