Skip to content

[Triton/Gluon] Import tests and benchmarks through the categorized paths - #5093

Merged
Boss2002n merged 2 commits into
mainfrom
satya/triton-categorized-imports-in-tests
Sep 1, 2026
Merged

Boss2002n merged 2 commits into
mainfrom
satya/triton-categorized-imports-in-tests

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

No description provided.

`_BACKWARD_COMPAT_MAP` in aiter/ops/triton/__init__.py exists for old external
callers; in-tree code is required to import from the categorized path. Five
sites still went through the flat compat names:

  aiter.ops.triton.causal_conv1d                     -> ...conv.causal_conv1d
  aiter.ops.triton.causal_conv1d_update_single_token -> ...conv....
  aiter.ops.triton.mha                               -> ...attention.mha
  aiter.ops.triton import extend_attention,          -> ...attention import ...
                          prefill_attention

Each target was resolved from _BACKWARD_COMPAT_MAP and every imported symbol
verified to exist there. The import blocks move section because ruff's isort
classifies the compat names as third party (no such file exists) and the real
modules as first party.

The two `test_legacy_gluon_import_path_warns` tests keep their legacy strings --
they assert the shim still warns.
@Boss2002n
Boss2002n requested review from a team and a lite review from Copilot August 29, 2026 00:32
@github-actions github-actions Bot changed the title [Triton] Import tests and benchmarks through the categorized paths [Triton/Gluon] Import tests and benchmarks through the categorized paths Aug 29, 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
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 5093 --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 updates Triton/Gluon test and benchmark modules to import ops via the categorized package paths (e.g., aiter.ops.triton.conv.*, aiter.ops.triton.attention.*) instead of legacy flat imports under aiter.ops.triton.*, aligning call sites with the repository’s required folder/import structure.

Changes:

  • Update conv test imports to use aiter.ops.triton.conv.* categorized paths.
  • Update attention benchmark imports to use aiter.ops.triton.attention.* categorized paths.
  • Minor import reordering/spacing to keep third-party imports grouped separately from project imports.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
op_tests/triton_tests/conv/test_causal_conv1d.py Switches causal conv1d imports to aiter.ops.triton.conv.causal_conv1d and normalizes import grouping.
op_tests/triton_tests/conv/test_causal_conv1d_update_single_token.py Switches PAD_SLOT_ID / update-single-token imports to categorized aiter.ops.triton.conv.* modules.
op_tests/op_benchmarks/triton/bench_fav3_sage.py Switches flash_attn_func import to aiter.ops.triton.attention.mha categorized path.
op_tests/op_benchmarks/triton/bench_extend_attention.py Switches imports to aiter.ops.triton.attention submodules for extend/prefill attention.

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

@zufayu
zufayu requested review from a team and Dewei-Wang-sh August 31, 2026 01:18
Copilot AI review requested due to automatic review settings August 31, 2026 06:19

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 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

op_tests/op_benchmarks/triton/bench_fav3_sage.py:17

  • This benchmark directly imports and calls an internal kernel module (aiter.ops.triton._triton_kernels...). Repo convention is that _triton_kernels/ entry points are launched only from the public wrapper layer under aiter.ops.triton.*; tests/benchmarks should call the wrapper API instead (e.g. aiter.ops.triton.attention.mha_v3.flash_attn_fp8_func(...) / flash_attn_func(...)).
import aiter
from aiter.ops.triton._triton_kernels.flash_attn_triton_amd import flash_attn_3
from aiter.ops.triton.attention.fav3_sage import (

@Boss2002n
Boss2002n merged commit cea4a32 into main Sep 1, 2026
68 of 71 checks passed
@Boss2002n
Boss2002n deleted the satya/triton-categorized-imports-in-tests branch September 1, 2026 12:58
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