Skip to content

[Triton/Gluon] Move attention configs to nested layout and unify their resolution - #5019

Open
Boss2002n wants to merge 2 commits into
mainfrom
satya/migrate-configs-attention
Open

[Triton/Gluon] Move attention configs to nested layout and unify their resolution#5019
Boss2002n wants to merge 2 commits into
mainfrom
satya/migrate-configs-attention

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

No description provided.

…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.
@Boss2002n
Boss2002n requested review from a team and a lite review from Copilot August 26, 2026 11:26
@github-actions github-actions Bot changed the title [Triton] Move attention configs to nested layout and unify their resolution [Triton/Gluon] Move attention configs to nested layout and unify their resolution Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: GPT-OSS-120B, DeepSeek-R1-0528, Kimi-K2.5
ci:all 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 5019 --add-label <label>

PR title tags:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf] and op tags like [MLA] are left untouched. Add the no-auto-title label to opt this PR out of title tagging.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json attention 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 load DEFAULT.json.
  • Standardize attention config filenames to DEFAULT.json under 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.

Comment on lines +34 to +35
from aiter.ops.triton.utils.core import load_config_json
from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir
Comment on lines +16 to +17
from aiter.ops.triton.utils.core import load_config_json
from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir
Comment on lines +11 to +12
from aiter.ops.triton.utils.core import load_config_json
from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir
Comment on lines +12 to +13
from aiter.ops.triton.utils.core import load_config_json
from aiter.ops.triton.utils.gemm_config_utils import resolve_config_dir
Comment on lines 24 to +26
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
Comment thread aiter/ops/triton/_triton_kernels/attention/extend_attention.py

@brunomazzottiamd brunomazzottiamd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing:

ImportError: cannot import name 'resolve_config_dir' from 'aiter.ops.triton.utils.gemm_config_utils'

Comment thread aiter/ops/triton/_triton_kernels/attention/mla_decode_rope.py
Copilot AI review requested due to automatic review settings August 26, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 20 changed files in this pull request and generated no new comments.

@brunomazzottiamd brunomazzottiamd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triton CI is green!

@zufayu
zufayu requested review from a team and brunomazzottiamd August 27, 2026 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants