Fix invalid ONNX graph from None start/end in aten_slice_scatter - #3006
Merged
Justin Chu (justinchuby) merged 2 commits intoAug 21, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
fruet (gabrielfruet)
marked this pull request as ready for review
August 21, 2026 21:30
Contributor
Author
|
Justin Chu (@justinchuby) Do you mind taking a look? |
Justin Chu (justinchuby)
approved these changes
Aug 21, 2026
Justin Chu (justinchuby)
left a comment
Collaborator
There was a problem hiding this comment.
Thanks!
Justin Chu (justinchuby)
enabled auto-merge (squash)
August 21, 2026 23:03
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3006 +/- ##
=======================================
Coverage 72.63% 72.63%
=======================================
Files 265 265
Lines 32204 32210 +6
Branches 3041 3042 +1
=======================================
+ Hits 23391 23397 +6
Misses 7779 7779
Partials 1034 1034 ☔ View full report in Codecov by Harness. |
Justin Chu (justinchuby)
merged commit Aug 21, 2026
a39c0a5
into
microsoft:main
30 of 33 checks passed
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.
aten::slice_scatterproduced an invalid ONNX graph wheneverstartorendcame in asNone. The lowering unsqueezed both bounds unconditionally, so aNoneturned into an empty-string input toUnsqueeze. A missingstartnow defaults to 0 and a missingendtoINT64_MAX, a full slice, matching whataten_slicealready does.Changes:
torch_lib/ops/core.py: build theSlicebounds conditionally, unsqueezingstartorendonly when they are provided.tests/function_libs/torch_lib/extra_opinfo.py: regression sample-input cases forNonestart,Noneend, both, and a step-2 variant.Testing: the existing slice_scatter OpInfo suite now exercises the
Nonebounds.Fixes #2372