Skip to content

[Triton/Gluon] Use absolute imports in the wrapper layer - #5092

Merged
Boss2002n merged 2 commits into
mainfrom
satya/triton-absolute-imports-wrapper-layer
Sep 1, 2026
Merged

Boss2002n merged 2 commits into
mainfrom
satya/triton-absolute-imports-wrapper-layer

Conversation

@Boss2002n

Copy link
Copy Markdown
Contributor

No description provided.

`.github/instructions/aiter-ops-triton.instructions.md` allows only absolute
`from aiter.ops.triton...` imports; relative imports are flagged. Nine wrapper
modules still used them: the comms package (including one `..iris` reach from
comms/fused), the quant and gated_delta_net package `__init__`s, the
function-local imports in moe_routing/routing.py, and utils/types.py.

Import targets are unchanged -- each relative path is rewritten to the absolute
spelling of the same module. Two `__init__` files needed black's line wrapping
once the names got longer.

`aiter/ops/triton/__init__.py` still has three relative imports; it is left for
a follow-up because #5023 already edits that file.
@Boss2002n
Boss2002n requested review from a team and a lite review from Copilot August 29, 2026 00:28
@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 5092 --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.

@github-actions github-actions Bot changed the title [Triton] Use absolute imports in the wrapper layer [Triton/Gluon] Use absolute imports in the wrapper layer Aug 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.

Pull request overview

This PR updates Triton/Gluon wrapper-layer modules to use fully qualified absolute imports (from aiter.ops.triton...) instead of relative imports, aligning the wrapper layer with the repository’s import conventions and reducing ambiguity in package resolution.

Changes:

  • Replaced relative imports with absolute imports across several Triton wrapper modules and package __init__.py files.
  • Updated local (function-scoped) imports in MoE routing to use absolute module paths.
  • Normalized TYPE_CHECKING-only imports to absolute paths for consistency.

Reviewed changes

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

Show a summary per file
File Description
aiter/ops/triton/utils/types.py Switches internal utility import to absolute path.
aiter/ops/triton/quant/init.py Converts quant package exports to absolute imports.
aiter/ops/triton/moe/moe_routing/routing.py Converts function-scoped routing imports to absolute paths.
aiter/ops/triton/gated_delta_net/init.py Converts gated-delta-net public exports to absolute imports.
aiter/ops/triton/comms/reduce_scatter.py Updates TYPE_CHECKING import to absolute path.
aiter/ops/triton/comms/fused/reduce_scatter_rmsnorm_quant_all_gather.py Updates TYPE_CHECKING import to absolute path.
aiter/ops/triton/comms/fused/init.py Converts fused comms exports to absolute imports.
aiter/ops/triton/comms/all_gather.py Updates TYPE_CHECKING import to absolute path.
aiter/ops/triton/comms/init.py Converts comms package exports to absolute imports.

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

@Boss2002n
Boss2002n merged commit 63114e4 into main Sep 1, 2026
68 of 71 checks passed
@Boss2002n
Boss2002n deleted the satya/triton-absolute-imports-wrapper-layer 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