Repository navigation
[Triton/Gluon] Use absolute imports in the wrapper layer - #5092
Conversation
`.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.
🏷️ 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 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__.pyfiles. - 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.
No description provided.