Skip to content

[Triton/Gluon] Move Triton unit tests into their wrapper's folder - #5942

Merged
Boss2002n merged 2 commits into
mainfrom
satya/fix_kernel_placement_kda
Sep 30, 2026
Merged

Boss2002n merged 2 commits into
mainfrom
satya/fix_kernel_placement_kda

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

Move _triton_kernels/chunk_delta_attn/ to _triton_kernels/kimi_delta_attn/
The wrapper that launches these kernels is
aiter/ops/triton/kimi_delta_attn/chunk_delta_attn.py, so the kernel
directory takes the wrapper folder's name

@Boss2002n Boss2002n self-assigned this Sep 29, 2026
@Boss2002n
Boss2002n requested review from a team and a balanced review from Copilot September 29, 2026 12:41
@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
multigpu Aiter multi-GPU tests on the 8-GPU runner
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 5942 --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.

@github-actions github-actions Bot changed the title Move Triton unit tests into their wrapper's folder [Triton/Gluon] Move Triton unit tests into their wrapper's folder Sep 29, 2026

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.

Copilot review overview

🟡 Changes recommended

Tests remain in the legacy folder, guidance references are stale, and tests and benchmarks still depend directly on private kernels.

Review effort: Balanced
Findings: 5 Medium severity · 1 Low severity

Open (6)
What changed in this PR

Relocates Kimi Delta Attention kernel modules under the wrapper-aligned kimi_delta_attn package and updates imports across wrappers, tests, benchmarks, and Gluon kernels.

Changes:

  • Renames internal Triton/Gluon kernel paths and updates consumers.
  • Relocates shared KDA utilities and launch helpers.
  • Updates tests and benchmarks to reference the new private paths.
File Description
op_tests/​triton_tests/​chunk_delta_attn/​test_flash_kda.py Updates Triton/Gluon imports.
op_tests/​triton_tests/​chunk_delta_attn/​test_fast_launch.py Updates fast-launch imports.
op_tests/​triton_tests/​chunk_delta_attn/​test_chunk_delta_attn_fwd.py Updates KDA utility imports.
op_tests/​op_benchmarks/​triton/​bench_flash_kda.py Updates FlashKDA benchmark import.
op_tests/​op_benchmarks/​triton/​bench_chunk_delta_attn.py Updates chunk-attention benchmark import.
aiter/​ops/​triton/​kimi_delta_attn/​chunk_delta_attn.py Points the public wrapper at the relocated kernels.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​wy_fast.py Updates internal utility imports.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​utils/​l2norm.py Relocates L2-normalization kernels.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​utils/​index.py Updates shared utility import.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​utils/​cumsum.py Updates cumsum dependencies.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​utils/​__init__.py Establishes the relocated utility package.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​intra_attn.py Updates internal KDA imports.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​gla_output.py Updates internal utility imports.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​gate.py Updates shared utility import.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​flash_kda.py Updates Triton and Gluon dependencies.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​fast_launch.py Relocates the optimized launch helper.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​chunk_fwd.py Updates forward-pipeline imports.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​chunk_delta_attn_utils.py Relocates shared KDA utilities.
aiter/​ops/​triton/​_triton_kernels/​kimi_delta_attn/​__init__.py Re-exports relocated implementations.
aiter/​ops/​triton/​_triton_kernels/​fusions/​attn_res.py Updates an internal path reference.
aiter/​ops/​triton/​_gluon_kernels/​gfx950/​kimi_delta_attn/​flash_kda_k2.py Updates the fast-launch dependency.
aiter/​ops/​triton/​_gluon_kernels/​gfx950/​kimi_delta_attn/​flash_kda_k1.py Updates the fast-launch dependency.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread op_tests/op_benchmarks/triton/bench_chunk_delta_attn.py
Comment thread op_tests/op_benchmarks/triton/bench_flash_kda.py
Comment thread op_tests/triton_tests/chunk_delta_attn/test_chunk_delta_attn_fwd.py
Comment thread op_tests/triton_tests/chunk_delta_attn/test_fast_launch.py
Comment thread op_tests/triton_tests/chunk_delta_attn/test_flash_kda.py
Comment thread aiter/ops/triton/_triton_kernels/fusions/attn_res.py
@Boss2002n
Boss2002n force-pushed the satya/fix_kernel_placement_kda branch from 6042266 to 8530c0f Compare September 29, 2026 12:59
The wrapper that launches these kernels is
aiter/ops/triton/kimi_delta_attn/chunk_delta_attn.py, so the kernel
directories take the wrapper folder's name; kernel directories mirror the
wrapper folder, not the kernel family.

- _triton_kernels/chunk_delta_attn/ -> _triton_kernels/kimi_delta_attn/:
  git mv of the 13 files plus the import path in every module that names the
  old one: the wrapper, the kernels' own absolute imports, the gfx950 Gluon
  flash_kda kernels, fusions/attn_res.py, the two benchmarks and the three
  tests. ruff re-sorted the import block of chunk_fwd.py, where the renamed
  module now sorts after the gated_delta_net one.
- _gluon_kernels/gfx950/chunk_delta_attn/ -> gfx950/kimi_delta_attn/: the
  Gluon flash_kda kernels are launched by the same wrapper (through
  _triton_kernels/kimi_delta_attn/flash_kda.py). git mv of the two files
  plus the import path in flash_kda.py and the two tests that import the
  kernels directly.

No code change otherwise.
Copilot AI balanced review requested due to automatic review settings September 29, 2026 22:01
@Boss2002n
Boss2002n force-pushed the satya/fix_kernel_placement_kda branch from 8530c0f to bc9fe6b Compare September 29, 2026 22:01

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.

Copilot review overview

🔵 Needs a closer look

The unit tests remain in the old directory, leaving the stated folder migration incomplete.

Review effort: Balanced
Findings: None

Resolved since last review (6)

@zufayu
zufayu requested review from a team and vgokhale September 30, 2026 00:33
Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:12

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.

Copilot review overview

🟡 Changes recommended

Tests remain outside the wrapper-aligned folder, bypass public APIs, and leave required documentation references stale.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)

Comment thread op_tests/triton_tests/chunk_delta_attn/test_flash_kda.py
@Boss2002n
Boss2002n merged commit 910e4d2 into main Sep 30, 2026
70 of 71 checks passed
@Boss2002n
Boss2002n deleted the satya/fix_kernel_placement_kda branch September 30, 2026 17:24
Boss2002n added a commit that referenced this pull request Oct 1, 2026
#5942 edited the three chunk_delta_attn tests this branch moves to
triton_tests/kimi_delta_attn/; the edits apply cleanly at the new paths.
Boss2002n added a commit that referenced this pull request Oct 1, 2026
#5943 and #5942 moved gated_delta_rule/ and chunk_delta_attn/ into their
wrapper folders, so the test-placement example now uses attention/mha.py.
brunomazzottiamd pushed a commit that referenced this pull request Oct 1, 2026
#5943 and #5942 moved gated_delta_rule/ and chunk_delta_attn/ into their
wrapper folders, so the test-placement example now uses attention/mha.py.
Boss2002n added a commit that referenced this pull request Oct 13, 2026
A config change now selects the tests of the kernels that load that
config and of the kernels that call them, instead of its whole op
folder. CK/ASM tuning CSVs no longer force the full suite, since no
Triton kernel reads them. Attention configs also map to
kimi_delta_attn/, where chunk_delta_attn/ moved in #5942.

While DRY_RUN is on, CI still runs every test and only prints this
selection. On the 17 config-only commits merged to main since Sep 10,
the selection is 1-13 test files where CI ran 118-137.
Boss2002n added a commit that referenced this pull request Oct 13, 2026
A config change now selects the tests of the kernels that load that
config and of the kernels that call them, instead of its whole op
folder. CK/ASM tuning CSVs no longer force the full suite, since no
Triton kernel reads them. Attention configs also map to
kimi_delta_attn/, where chunk_delta_attn/ moved in #5942.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants