-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Shape functions: Use friendlier clamping pattern #74980
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
Conversation
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 4120276 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
@pytorchbot rebase this please |
eellison
left a comment
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.
nice! LGTM
|
hmm, looks like pytorch bot rebase is not a thing, mind rebasing ? |
When start_val == 0, using the comparison `start_val > self[dim]` can be folded easily (0 is never strictly greater than the result of `self[dim]`), but `start_val >= self[dim]` can't. Since we assign `start_val = sef[dim]` in the body anyway, both these are equivalent
|
Just updated it. |
|
@pytorchbot merge this please |
|
Hey @silvasean. |
Summary: When start_val == 0, using the comparison `start_val > self[dim]` can be folded easily (0 is never strictly greater than the result of `self[dim]`), but `start_val >= self[dim]` can't. Since we assign `start_val = sef[dim]` in the body anyway, both these are equivalent Pull Request resolved: #74980 Approved by: https://github.com/eellison Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/640c1be9006c5416887ff66ff2961eb530983d17 Reviewed By: b0noI Differential Revision: D35404318 fbshipit-source-id: 7fc949b1100da06e6e09c3b9a22e0fdaa91e8322
When start_val == 0, using the comparison
start_val > self[dim]can be folded easily (0 is never strictly greater than the result ofself[dim]), butstart_val >= self[dim]can't. Since we assignstart_val = sef[dim]in the body anyway, both these are equivalent