Repository navigation
[Triton/Gluon] Tuning scripts: write the largest tuned bucket as "any" - #6922
Conversation
🏷️ 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.
🟡 Changes recommended
The convention change still needs the required shared documentation updates.
2 open issues
What changed in this PR
This PR changes the GEMM tuning installer to use the largest-bound tuned bucket for "any", rather than always copying the family default.
Changes:
- Refresh
"any"on each install, usingDEFAULT.jsonwhen the largest-bound bucket is absent. - Print which bucket supplies
"any". - Update tuning and config documentation to describe the policy.
| File | Description |
|---|---|
aiter/ops/triton/utils/_triton/tuning/write_best_configs.py |
Selects and reports the source of "any". |
aiter/ops/triton/utils/_triton/tuning/sweep_configs.py |
Updates docstrings for the new policy. |
aiter/ops/triton/utils/_triton/tuning/README.md |
Documents largest-bound selection and default fallback. |
aiter/ops/triton/utils/_triton/tuning/AGENTS.md |
Revises the installer invariant. |
aiter/ops/triton/configs/AGENTS.md |
Updates specialized config guidance. |
Review effort: Balanced
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 |

Motivation
The installer of the GEMM tuning scripts writes
"any"as a copy of the"any"ofDEFAULT.json."any"is the config for M above the largest bound (8192). TheDEFAULT.jsonconfig is not tuned for the shape. For the gfx1250 Gluon GEMMs at M = 16384, it is 2.72x slower (geomean of 113 files) than theM_LEQ_8192config of the same file. #6921 changes the merged files.Technical details
write_best_configs.py:"any"is a copy of the bucket of the largest bound. This isM_LEQ_8192for the standard bounds andM_LEQ_2048forGEMM-A16W16-gated. The installer writes it again on every install, so"any"follows a new tune of that bucket."any"ofDEFAULT.json. This occurs for a new shape when M = 8192 is not swept. A tile that is tuned for a smaller M never becomes"any"."any".AGENTS.md, the tuningREADME.md,configs/AGENTS.mdand thesweep_configs.pydocstrings.Test plan
The checks of the tuning
AGENTS.md, on gfx1250 (MI455X) with upstream Triton main2c9fb87df:_utils,kernelsandspaceimport without torch.black --check .andruff check .pass. EveryDEFAULT.jsonkey is inSEARCH_SPACE.harness.py gemm_afp4wfp4_preshuffle --M 64 --N 7168 --K 16384 --plan.sweep_configs.py gemm_afp4wfp4_preshuffle --M 4 64 --N 256 --K 512 --gpu 0. This makes a new file withoutM_LEQ_8192, so"any"must be the"any"ofDEFAULT.json.sweep_configs.py gemm_afp4wfp4_preshuffle --all-buckets --N 256 --K 512 --gpu 0 1 2 3."any"must be equal to the newM_LEQ_8192.verify_configs.py gemm_afp4wfp4_preshuffle --M 64 --N 256 --K 512 --expect-tuned. Then delete the test file.Test results
DEFAULT.jsonfiles).M_LEQ_4andM_LEQ_64, and"any"is equal to the"any"ofDEFAULT.json. The installer printsany: a copy of the any of DEFAULT.json."any"is equal toM_LEQ_8192(128x256x256, 4 warps,NUM_BUFFERS2,num_ctas4). The installer printsany: a copy of M_LEQ_8192and validates the 13 buckets through the loader.is_tunedis True, 1.419 us.