-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[BE] remove unnecessary _dispatch_sqrt by using ** 0.5 #131358
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
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/131358
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit cb69df0 with merge base 23ae6e2 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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.
We definitely did that on purpose. But I don't recall why so let's see how it goes :D
We did this to allow tensors and scalars to make their own calls, but the ** is already overloaded to do that. The only discrepancy then is perf, which I've timed and math.sqrt is no longer faster. |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Based on the discussion here where ** 0.5 is not slower than math.sqrt. pytorch#129905 (comment) Pull Request resolved: pytorch#131358 Approved by: https://github.com/albanD
@pytorchbot revert -c ghfirst -m "Internal uses this private API and landing that has been a pain so we're reverting this first" |
@pytorchbot successfully started a revert job. Check the current status here. |
@janeyx99 your PR has been successfully reverted. |
…)" This reverts commit 4c7f22d. Reverted #131358 on behalf of https://github.com/janeyx99 due to Internal uses this private API and landing that has been a pain so we're reverting this first ([comment](#131358 (comment)))
This should be totally fine now that I've changed relevant internal to not have the _dispatch_sqrt call D60253996 @pytorchbot merge -r |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Rebase failed due to
Raised by https://github.com/pytorch/pytorch/actions/runs/10167384355 |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Based on the discussion here where ** 0.5 is not slower than math.sqrt. #129905 (comment)
Stack from ghstack (oldest at bottom):