-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
min/max support for SymInt/Floats, finish as_strided/scatter/squeeze() backward symint support #86609
Conversation
…) backward symint support [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86609
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8bd5b66: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…er/squeeze() backward symint support" [ghstack-poisoned]
This is already in master now |
…er/squeeze() backward symint support" [ghstack-poisoned]
It looks like #86643 hasn't landed yet? (Separately, seems like CI didn't kick off after I updated this PR for some reason) |
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
@@ -231,8 +232,7 @@ def _make_magic(method, func, py_type): | |||
|
|||
def magic_impl(self, other): | |||
if method in ["min", "max"]: | |||
# op = getattr(builtins, method) | |||
return self | |||
op = getattr(builtins, method) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@albanD I could delete this PR, but I noticed this - probably still worth landing?
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
…er/squeeze() backward symint support" [ghstack-poisoned]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
@@ -255,12 +255,11 @@ def magic_impl(self, other): | |||
return py_type(out, self.shape_env) | |||
|
|||
def unary_magic_impl(self): | |||
if method in ["ceil", "floor"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This one doesn't need to move since it is only used in the if right? The comment can be removed though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep - i'll remove this
…er/squeeze() backward symint support" This PR shouldn't matter too much, but I figured I'd land it instead of deleting. `PySymInt.min/max` are technically broken today, and this fixes them - but it doesn't matter (yet) because nobody is calling `min()` / `max()` on symints from python (they all happen using `std::min/max` in C++, which desugar to lt / gt calls). [ghstack-poisoned]
…er/squeeze() backward symint support" This PR shouldn't matter too much, but I figured I'd land it instead of deleting. `PySymInt.min/max` are technically broken today, and this fixes them - but it doesn't matter (yet) because nobody is calling `min()` / `max()` on symints from python (they all happen using `std::min/max` in C++, which desugar to lt / gt calls). [ghstack-poisoned]
This PR shouldn't matter too much, but I figured I'd land it instead of deleting.
PySymInt.min/max
are technically broken today, and this fixes them - but it doesn't matter (yet) because nobody is callingmin()
/max()
on symints from python (they all happen usingstd::min/max
in C++, which desugar to lt / gt calls).Stack from ghstack (oldest at bottom):