Repository navigation
[Triton/Gluon] gmm: gfx950 large-K/N config with JSON-driven shape dispatch - #5857
Conversation
Adds a gfx950 "large_kn" gmm config (8 warps) and an optional per-arch "dispatch" rule list in the gmm config JSON. get_config() returns the first rule whose min_K / min_N / min_rows_per_group all match, otherwise "default". Thresholds live only in JSON; arches without "dispatch" are unchanged. gfx950 rule: K >= 4096, N >= 4096, >= 256 rows per group. Measured on MI355X (fp16, CUDA-graph timing): 1.18-1.26x on matching shapes; configs that looked faster elsewhere lost 3-13% on small-K or <= 128 rows/group, which the rule excludes (all 70+ validated shapes under the rule are >= 0.98x). test_gmm: 118 passed.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Correct group-size dispatch, add direct selection tests, and update the documented configuration-loading guidance.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (3)
What changed in this PR
Adds gfx950 GMM shape-based dispatch for an optimized large_kn configuration.
Changes:
- Adds the 8-warp
large_knconfig and JSON thresholds. - Selects the first matching dispatch rule, falling back to
default. - Preserves behavior for architectures without dispatch rules.
Review findings:
- Moderate (2 votes): Dispatch uses
M / Ginstead of the actual minimum group size. - Moderate (4 votes): Direct dispatch-selection tests are missing.
- Nits (2, 1, and 1 votes): Update README/instruction documentation and align selection with the documented config-loader layer.
| File | Summary |
|---|---|
aiter/ops/triton/configs/gfx950/triton/gmm/gmm/DEFAULT.json |
Adds the large_kn configuration and dispatch thresholds. |
aiter/ops/triton/_triton_kernels/gmm.py |
Implements JSON-driven shape dispatch for GMM configurations. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


Adds a gfx950 "large_kn" gmm config (8 warps) and an optional per-arch "dispatch" rule list in the gmm config JSON. get_config() returns the first rule whose min_K / min_N / min_rows_per_group all match, otherwise "default". Thresholds live only in JSON; arches without "dispatch" are unchanged.
gfx950 rule: K >= 4096, N >= 4096, >= 256 rows per group. Measured on MI355X (fp16, CUDA-graph timing): 1.18-1.26x on matching shapes; configs that looked faster elsewhere lost 3-13% on small-K or <= 128 rows/group, which the rule excludes (all 70+ validated shapes under the rule are >= 0.98x).
test_gmm: 118 passed.
Motivation
Technical Details
Test Plan
The additional test does not trigger kernel runs on GPU. It is to validate if the correct config is triggered for a given shape. This was added based on co-pilot recommendations.
Test Result
gmm — fp16 (TFLOPS)
large_kndefault(unchanged)default(unchanged)large_knlarge_knlarge_knlarge_knshapes)Submission Checklist