You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Arm backend: Delegate int64 only to the operators EXT-INT64 covers (2/3) - #24306
Adds TOSA_EXT_INT64_SupportList, the operators EXT-INT64 covers, and delegates int64 only to those. Today the int64 check is skipped entirely when the extension is declared, so an operator that cannot carry int64 is accepted and fails later, for example cumsum under TOSA-1.1+INT+int64. An operator absent from the list now keeps the behavior it has without the extension. Comparisons, where, slice_copy, full_like and zeros_like stay off the list until part 3. Scoped to PRO-INT + EXT-INT64, as discussed in #24128.
Added partitioning tests under TOSA-1.1+INT+int64: a listed operator on int64 operands delegates, while unlisted operators and mixed-width operands fall back to CPU. Eight of these cases fail on main. 44 single-op models: identical to main under TOSA-1.0+INT, and under TOSA-1.1+INT+int64cumsum falls back instead of failing and sum_dim falls back as it does without the extension.
This comment was automatically generated by Dr. CI and updates every 15 minutes.
meta-claBot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Oct 29, 2026
This second part of the Arm int64 work restricts delegation under PRO-INT + EXT-INT64 to operators with supported lowerings, while retaining existing checks for unlisted operators.
Changes:
Adds an EXT-INT64 operator allowlist and operand-width checks.
Enables int64 eligibility for where and slice_copy under the supported profile.
Adds partitioning tests for accepted operations and CPU fallback cases.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Dynamic views with symbolic shapes can crash partitioning, while mixed bool/int64 where operands can produce an unsupported cast that the current tests fail to exercise.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The int64 support checks omit supported padding operations and incorrectly accept mixed bool/int64 concatenation, causing unnecessary CPU fallback and a lowering error, respectively.
This list omits aten.pad.default and aten.constant_pad_nd.default, so padding an int64 user tensor now falls back to CPU under TOSA-1.1+INT+int64. Constant padding lowers to PAD, whose dialect validator and visitor already accept int64 with the extension. Include both padding entry points and add a partitioning regression case.
Preserve bool data operands in int64 cat partitioning
Removing torch.bool from every operand set accepts torch.cat([x_int64, flags_bool]) under TOSA-1.1+INT+int64. Its inputs are not promoted on the INT path, so CONCAT lowering raises a dtype-mismatch error instead of falling back. Exclude only the where condition, retain boolean data operands, and add a mixed bool/int64 cat regression case.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human review is needed because the int64 allowlist changes conflict with comparison lowering and operator-preservation requirements, causing export failures and delegation contract violations.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because the int64 support changes admit slices and comparisons that fail lowering while rejecting a supported shape operation.
The reason will be displayed to describe this comment to others. Learn more.
Could you explain how this list was derived and what criteria were used to select the operators? It’s fine if Claude Code helped generate it; we can refine the list internally later.
The reason will be displayed to describe this comment to others. Learn more.
Sure. I built it with Claude Code from tosa.xml in the TOSA 1.1 spec. I started from the operators with an i64 row under EXT-INT64 and kept the edge operators that lower only to those, through the visitors #24128 enabled int64 on. I then lowered each one under TOSA-1.1+INT+int64 with values outside the int32 range. Going back over it for your other comment, I also took off the comparisons, full_like and zeros_like. Without quantization the comparisons fail in CastIntComparisonInputsPass, on main as well, and full_like and zeros_like hit the same buffer narrowing as where. They fall back now, and I'll add them back in the next PR. I also fixed the comment above the list, which said EXT-INT64 leaves out ARGMAX.
The reason will be displayed to describe this comment to others. Learn more.
Could we address the buffer-narrowing interaction before enabling these INT64 paths (slice_copy and where)? Under TOSA-1.1+INT+int64, the newly accepted operations still encounter CastInt64BuffersToInt32Pass:
x[::2] on a five-element INT64 tensor creates an internal padding buffer that gets narrowed to INT32, causing a CONCAT dtype mismatch.
torch.where(cond, x, self.buffer), with a registered INT64 buffer containing 2**40, fails the pass’s INT32 range check.
Both cases previously exported successfully with CPU fallback.
A small fix would be to defer the new INT64 dtype allowances in WhereSupported and SliceCopySupported until the buffer-preservation changes land. We could update the where_int64 expectation and add regression tests confirming these cases export successfully without delegation. Alternatively, we could bring the necessary buffer-preservation fix into this PR.
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I went with deferring them. WhereSupported and SliceCopySupported are back to main, and where and slice_copy are off the int64 list until the buffer changes land in the next PR. Both of your cases export with CPU fallback now, and I added them as regression tests. I also changed the where_int64 case to expect fallback.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Human assessment is needed because inconsistent delegation of dynamic int64 shape producers and consumers can leave an unserializable SymInt at the delegate boundary.
No open issues 🎉
Review effort: Balanced
This branch has not been deployed
No deployments
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
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.
Summary
Adds
TOSA_EXT_INT64_SupportList, the operatorsEXT-INT64covers, and delegates int64 only to those. Today the int64 check is skipped entirely when the extension is declared, so an operator that cannot carry int64 is accepted and fails later, for examplecumsumunderTOSA-1.1+INT+int64. An operator absent from the list now keeps the behavior it has without the extension. Comparisons,where,slice_copy,full_likeandzeros_likestay off the list until part 3. Scoped to PRO-INT + EXT-INT64, as discussed in #24128.Part 2 of 3 for #24095, following #24128.
Test Plan
Added partitioning tests under
TOSA-1.1+INT+int64: a listed operator on int64 operands delegates, while unlisted operators and mixed-width operands fall back to CPU. Eight of these cases fail on main. 44 single-op models: identical to main underTOSA-1.0+INT, and underTOSA-1.1+INT+int64cumsumfalls back instead of failing andsum_dimfalls back as it does without the extension.This PR was authored with Claude Code.
cc @zingo @YufengShi-dudu