You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Triton/Gluon] Tuning based on Default config json - #6128
All standard extended tests (excludes ci:atom_full)
Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 6128 --add-label <label>
One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.
PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.
Filtering the baseline by DEFAULT.json keys changes an already supported installed config. For gfx1250 GEMM-A8W8 at M=64, N=2112, K=7168, the specialized entry uses cache_modifier='.cg', but DEFAULT.json omits that key. This code drops it, and compute_splitk_params() backfills None, so the benchmark no longer measures the installed baseline. Benchmark the unmodified installed config and preserve its supported parameters if it wins, or include those parameters in DEFAULT.json before filtering.
Prune tile combinations before expanding launch options
For the existing gfx1250 Gluon AFP8WFP8 preshuffle defaults at M=8192, N=7168, K=16384, the shape-filtered product contains 248,832,000 combinations. This loop constructs a dictionary for every combination before resource pruning, making planning itself a substantial bottleneck; --all-buckets repeats it across M values. Please prune tile/resource combinations before expanding independent launch options, preserving the exhaustive set of valid candidates without traversing the rejected Cartesian product.
Update stall deadline only on worker progress markers
Any log output resets t_last, not just completed candidates. A worker that prints compiler diagnostics without finishing a candidate can therefore exceed --stall indefinitely. A diagnostic-only subprocess reproduces this behavior. Advance the deadline only for the worker's ready and completed-result markers, retaining incomplete log lines for the next read.
Refresh installed baseline before resumed winner selection
On a single-GPU resume without a final-round file, sweep_shard() skips the baseline once its old record is final. If installation or a manual edit has changed the installed config, load_winners() still lets the old baseline win—even outside the current plan—without measuring the current installed config. Refresh the baseline before selection. Running the existing final round for single-GPU sweeps as well fixes this, at the cost of re-timing up to ten finalists.
Preserve winning supported kpack values during installation
On gfx1250, GEMM-A8W8 includes kpack in DEFAULT.json, so the Triton search benchmarks both 1 and 2. If kpack=2 wins, this filter removes it before installation. The loader check compares against the filtered table, so it cannot detect that the installed options differ from the measured winner. Preserve supported kpack values when installing, or enforce the intended omission policy before benchmarking; do not change the winning options only after timing.
Conflicts:
- aiter/ops/triton/README.md and the Copilot review rules: kept the
short versions from this branch and added the changes of #6505. The
shared @triton.jit device helpers are now in _triton_kernels/common/,
and activation.py is not a flat wrapper any more.
- aiter/ops/triton/utils/_triton/tuning/README.md: took the new version
from #6128.
#6128 changed the GEMM loader and the tuning scripts. The config rules,
the Copilot review rules and the README now agree with it:
- A specialized file with "DEFAULT_FALLBACK": true gets its missing
buckets from DEFAULT.json. Copilot does not flag such a file.
- is_tuned is True only for a bucket from the specialized file, not for
"any" or a bucket from DEFAULT.json.
- DEFAULT.json sets the keys of a family, and the tuning scripts tune
only these keys. Entries must have the keys of DEFAULT.json. The fixed
list of ten keys is now an example: 25 of the 106 Triton GEMM
DEFAULT.json files do not have all ten.
- For GEMM, the tuning scripts write the specialized file, and
verify_configs.py --expect-tuned checks is_tuned.
* [Docs] Make the Triton docs short and simple
Rewrite the Triton README, the Copilot review rules, the config rules
(configs/CLAUDE.md), the Triton test README and the Triton part of
CONTRIBUTE.md. Each one starts with a short list of rules. The text uses
ASD-STE100 (Simplified Technical English).
The rules stay the same, with two additions: comments are one or two
sentences, and docs, comments and PR descriptions use ASD-STE100. The
old Triton tips in CONTRIBUTE.md (block sizes, pipelining, cache
modifiers) are removed. The kpack rule in configs/CLAUDE.md now agrees
with the README: only gfx942 configs can have kpack.
* [Docs] Use only M_LEQ keys for M buckets
The Triton docs now tell contributors to use only M_LEQ_<x> keys and
"any" for the M buckets of a GEMM config. The README has a new rule for
this. The config rules and the Copilot review rules agree with it.
The config rules and the Copilot review rules also say that you can use
cache_modifier on all archs, also on gfx1250. Copilot must not flag it
in a gfx1250 config.
* [Docs] Rename configs/CLAUDE.md to configs/AGENTS.md
Codex, Copilot and Claude Code all read AGENTS.md. This commit only
renames the file. The next commit adds the files that point to it.
* [Docs] Add AGENTS.md entry points for coding agents
Claude Code, Codex and Copilot now read the Triton rules from the same
files. No rule is written twice.
- aiter/ops/triton/AGENTS.md lists the rule files: the README, the
config rules, the test README and the Copilot review checks. Claude
Code imports the two README files from it.
- op_tests/triton_tests/AGENTS.md and
op_tests/op_benchmarks/triton/AGENTS.md point to it.
- aiter/ops/triton/CLAUDE.md only imports the four AGENTS.md files.
Claude Code does not read AGENTS.md files when the repository root
has a CLAUDE.md, or in versions before v2.1.277. The imports work in
all cases.
- The links to configs/CLAUDE.md now go to configs/AGENTS.md. This
includes three code comments.
- Copilot flags a new CLAUDE.md file, and a new AGENTS.md file that
aiter/ops/triton/CLAUDE.md does not import.
- Copilot code review does not read nested AGENTS.md files. The review
checks stay in .github/instructions/aiter-ops-triton.instructions.md.
* [Docs] Fix the config file name pattern and the CLAUDE.md rule
The README showed only <CONFIG_NAME>-N=<N>-K=<K>.json for specialized
config files. That pattern excludes valid names, such as batched
B=..-N=..-K=.. files, custom suffixes and MHC C=.. files. The README now
uses <CONFIG_NAME>-<suffix>.json, as configs/AGENTS.md does.
The CLAUDE.md rule could be read as "remove aiter/ops/triton/CLAUDE.md".
The docs now say that this file is the only CLAUDE.md, that it must
stay, and that Copilot must not flag it.
* [Docs] Rename tuning/CLAUDE.md to tuning/AGENTS.md
#6128 added the tuning rules as a CLAUDE.md. Only Claude Code reads that
name. This commit only renames the file. The next commit links to it.
* [Docs] Link the tuning AGENTS.md like the other rule files
aiter/ops/triton/CLAUDE.md now imports the tuning rules, and the index
in aiter/ops/triton/AGENTS.md lists them. The tuning rules now link to
configs/AGENTS.md. They also say "only M_LEQ_* buckets are tuned" in
place of the M_GEQ sentence.
* [Docs] Describe DEFAULT_FALLBACK and the new GEMM tuning flow
#6128 changed the GEMM loader and the tuning scripts. The config rules,
the Copilot review rules and the README now agree with it:
- A specialized file with "DEFAULT_FALLBACK": true gets its missing
buckets from DEFAULT.json. Copilot does not flag such a file.
- is_tuned is True only for a bucket from the specialized file, not for
"any" or a bucket from DEFAULT.json.
- DEFAULT.json sets the keys of a family, and the tuning scripts tune
only these keys. Entries must have the keys of DEFAULT.json. The fixed
list of ten keys is now an example: 25 of the 106 Triton GEMM
DEFAULT.json files do not have all ten.
- For GEMM, the tuning scripts write the specialized file, and
verify_configs.py --expect-tuned checks is_tuned.
* [Docs] Name the right logger for library code and for tests
The README said to log with "from aiter import logger". No library file
under aiter/ops/triton/ does that: 88 files use AiterTritonLogger() from
aiter/ops/triton/utils/logger.py, which reads AITER_TRITON_LOG_LEVEL.
Tests and benchmarks use "from aiter import logger", which reads
AITER_LOG_LEVEL.
The README, the test README and the Copilot review rules now say which
logger to use where. The test README also says how to see the debug
output of the library: AITER_TRITON_LOG_LEVEL=DEBUG with pytest
--log-cli-level=DEBUG. This logger has no handler of its own, so -s does
not show it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor entire tuning to support gluon kernels
Triton gemm_afp4wfp4 on gfx1250, M=64, N=2112, K=7168 (the M_LEQ_64 bucket).
branch | 64×128, 8 warps, waves_per_eu 1
main (rocprof) | 64×128, 8 warps, waves_per_eu 1
Both configs generated are identical taking 9.19 µs and 9.07 µs