[Triton/Gluon] Move attention configs to nested layout and unify their resolution - #5019
[Triton/Gluon] Move attention configs to nested layout and unify their resolution#5019Boss2002n wants to merge 2 commits into
Conversation
…lution
Relocate 14 attention config files from the flat arch-prefixed layout to
configs/<arch>/triton/attention/<d_type>/DEFAULT.json - mha, extend_attention,
mla_decode_rope, hstu_attn_fwd and hstu_attn_bwd - retiring configs/hstu_attn/.
The redundant -DEFAULT suffix is dropped from directory names (the file is
already DEFAULT.json), matching the chunk_delta_attn precedent. The six reader
modules resolve through the shared resolve_config_dir("attention", ...) probe
instead of hand-built paths. LEANATTN is not migrated: upstream removed the
lean_atten kernel and its config.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
PR title tags: |
There was a problem hiding this comment.
Pull request overview
This PR migrates several attention kernel tuning configs into the per-arch nested config layout (<arch>/<backend>/<op>/<config_family>/DEFAULT.json) and updates Triton attention kernel modules to load configs from the nested layout (intended to replace ad-hoc arch-prefixed file paths).
Changes:
- Add nested-layout
DEFAULT.jsonattention configs for multiple arches (gfx942/gfx950/gfx1151/gfx1250). - Update Triton attention kernel modules to resolve their config directory via a shared helper (
resolve_config_dir) and loadDEFAULT.json. - Standardize attention config filenames to
DEFAULT.jsonunder nested directories.
Reviewed changes
Copilot reviewed 6 out of 20 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| aiter/ops/triton/configs/gfx950/triton/attention/mla_decode_rope/DEFAULT.json | Adds gfx950 nested-layout defaults for MLA decode rope tuning entries. |
| aiter/ops/triton/configs/gfx950/triton/attention/mha/DEFAULT.json | Adds gfx950 nested-layout defaults for MHA fwd/bwd tuning entries. |
| aiter/ops/triton/configs/gfx950/triton/attention/hstu_attn_fwd/DEFAULT.json | Adds gfx950 nested-layout defaults for HSTU attention forward tuning. |
| aiter/ops/triton/configs/gfx950/triton/attention/hstu_attn_bwd/DEFAULT.json | Adds gfx950 nested-layout defaults for HSTU attention backward tuning. |
| aiter/ops/triton/configs/gfx950/triton/attention/extend_attention/DEFAULT.json | Adds gfx950 nested-layout defaults for extend-attention tuning. |
| aiter/ops/triton/configs/gfx942/triton/attention/mla_decode_rope/DEFAULT.json | Adds gfx942 nested-layout defaults for MLA decode rope tuning entries. |
| aiter/ops/triton/configs/gfx942/triton/attention/mha/DEFAULT.json | Adds gfx942 nested-layout defaults for MHA fwd/bwd tuning entries. |
| aiter/ops/triton/configs/gfx942/triton/attention/hstu_attn_fwd/DEFAULT.json | Adds gfx942 nested-layout defaults for HSTU attention forward tuning. |
| aiter/ops/triton/configs/gfx942/triton/attention/hstu_attn_bwd/DEFAULT.json | Adds gfx942 nested-layout defaults for HSTU attention backward tuning. |
| aiter/ops/triton/configs/gfx942/triton/attention/extend_attention/DEFAULT.json | Adds gfx942 nested-layout defaults for extend-attention tuning. |
| aiter/ops/triton/configs/gfx1250/triton/attention/mla_decode_rope/DEFAULT.json | Adds gfx1250 nested-layout defaults for MLA decode rope tuning entries. |
| aiter/ops/triton/configs/gfx1250/triton/attention/mha/DEFAULT.json | Adds gfx1250 nested-layout defaults for MHA fwd/bwd tuning entries. |
| aiter/ops/triton/configs/gfx1250/triton/attention/extend_attention/DEFAULT.json | Adds gfx1250 nested-layout defaults for extend-attention tuning. |
| aiter/ops/triton/configs/gfx1151/triton/attention/mha/DEFAULT.json | Adds gfx1151 nested-layout defaults for MHA fwd/bwd tuning entries. |
| aiter/ops/triton/_triton_kernels/attention/mla_decode_rope.py | Switches config loading to nested-layout via resolve_config_dir + DEFAULT.json. |
| aiter/ops/triton/_triton_kernels/attention/mha.py | Switches MHA fwd config loading to nested-layout via resolve_config_dir. |
| aiter/ops/triton/_triton_kernels/attention/mha_onekernel_bwd.py | Switches MHA onekernel bwd config loading to nested-layout via resolve_config_dir. |
| aiter/ops/triton/_triton_kernels/attention/mha_fused_bwd.py | Switches MHA fused bwd config loading to nested-layout via resolve_config_dir. |
| aiter/ops/triton/_triton_kernels/attention/hstu_attention.py | Switches HSTU fwd/bwd config loading to nested-layout via resolve_config_dir. |
| aiter/ops/triton/_triton_kernels/attention/extend_attention.py | Switches extend-attention config loading to nested-layout via resolve_config_dir. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| from aiter.ops.triton.utils.core import load_config_json | ||
| from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir |
| from aiter.ops.triton.utils.core import load_config_json | ||
| from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir |
| from aiter.ops.triton.utils.core import load_config_json | ||
| from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir |
| from aiter.ops.triton.utils.core import load_config_json | ||
| from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir |
| from aiter.ops.triton.utils._triton.kernel_repr import make_kernel_repr | ||
| from aiter.ops.triton.utils.core import AITER_TRITON_CONFIGS_PATH, load_config_json | ||
| from aiter.ops.triton.utils.core import load_config_json | ||
| from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir |
brunomazzottiamd
left a comment
There was a problem hiding this comment.
CI is failing:
ImportError: cannot import name 'resolve_config_dir' from 'aiter.ops.triton.utils.gemm_config_utils'
brunomazzottiamd
left a comment
There was a problem hiding this comment.
Triton CI is green!
No description provided.