[torchlib] Fix and implement overloads for aten::remainder#2727
Merged
justinchuby merged 4 commits intomainfrom Dec 12, 2025
Merged
[torchlib] Fix and implement overloads for aten::remainder#2727justinchuby merged 4 commits intomainfrom
justinchuby merged 4 commits intomainfrom
Conversation
Signed-off-by: Justin Chu <justinchuby@users.noreply.github.com>
justinchuby
commented
Dec 12, 2025
titaiwangms
approved these changes
Dec 12, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2727 +/- ##
==========================================
- Coverage 70.07% 70.07% -0.01%
==========================================
Files 226 226
Lines 27266 27276 +10
Branches 2754 2754
==========================================
+ Hits 19107 19113 +6
- Misses 7209 7213 +4
Partials 950 950 ☔ View full report in Codecov by Sentry. |
xadupre
reviewed
Dec 12, 2025
xadupre
approved these changes
Dec 12, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the aten::remainder.Scalar_Tensor overload which previously failed because it attempted to access the dtype attribute on a scalar value. The fix separates the three overload variants into distinct functions, ensuring that dtype is always obtained from a tensor operand.
- Split the combined decorator for
.Tensorand.Scalaroverloads into separate implementations - Added dedicated implementation for
.Scalaroverload (Tensor, float) - Added dedicated implementation for
.Scalar_Tensoroverload (float, Tensor)
titaiwangms
approved these changes
Dec 12, 2025
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.
Previously the Scalar_Tensor overload will fail because the first arg will be a scalar which does not have dtype.