Repository navigation
fix(torch_guard): drop redundant aiter:: prefix from define schema for torch 2.13 - #4593
Merged
Merged
Conversation
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts Torch op registration in torch_guard so that torch.library.Library("aiter", ...) does not end up defining ops with a doubled namespace (aiter::aiter::<op>) on torch>=2.13.
Changes:
- Remove the redundant
aiter::prefix from the schema string passed toaiter_lib.define(...). - Add a clarifying comment documenting why the schema must be unqualified.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aiter_lib=Library("aiter",...) already adds the ns, so a schema of
"aiter::<op>" makes torch>=2.13 store a doubled "aiter::aiter::<op>" in
_op_defs (2.12 stripped it). At shutdown _clear_torch_ops_cache does
qualname.split("::") expecting 2 parts and raises "too many values to
unpack". Pass the bare "<op>" to define(); impl()/_register_fake() keep
the qualified name. torch.ops.aiter.<op> is unchanged.
ZhangLirong-amd
force-pushed
the
fix/torch213-double-ns-qualname
branch
from
August 6, 2026 06:03
55bcf7d to
ed3572f
Compare
micah-wil
added a commit
that referenced
this pull request
Nov 4, 2026
AMD's whl-next index has torch 2.13.0+rocm10.0.0 and +rocm10.1.0 for cp310 and cp312. The torch 2.13 op-name teardown crash behind the torch<2.13 default was fixed in #4593. ROCm 7.14 stays on 2.12.0+rocm7.14.1 (2.13.0 exists only for ROCm 7.14.0). Co-authored-by: Cursor <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
aiter_lib=Library("aiter",...) already adds the ns, so a schema of "aiter::" makes torch>=2.13 store a doubled "aiter::aiter::" in _op_defs in 2.13.
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist