-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
[MPS] Support for median with dim #88807
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88807
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fed16b0: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[MPS] Support for median with dim Test cases for odd/even
89db66b
to
fed16b0
Compare
Hi, @kulinseth As suggested in previous PR review now using is_macos_13_or_newer() for query to check macOS 13+ 🧪Added test case for if median at odd place and if at even place in test_median |
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.
Looks good. Thanks
@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 |
## Summary ⚡ **Aim**: Add support for aten::median for MPS backend (Fixes pytorch#87220) This is fresh clean PR from the previous [PR](pytorch#88554) - Implementing the new median function in aten/src/ATen/native/mps/operations/ReduceOps.mm - Adding it to aten/src/ATen/native/native_functions.yaml - Adding it to existing test_median ### **this will works like this** 🪶 median of entire input tensor on MPS `torch.median(mps_inputTensor)` median of along a dim `torch.median(mps_inputTensor, dim=[int], keepdim=[Bool])` Pull Request resolved: pytorch#88807 Approved by: https://github.com/kulinseth
Summary ⚡
Aim: Add support for aten::median for MPS backend (Fixes #87220)
This is fresh clean PR from the previous PR
this will works like this 🪶
median of entire input tensor on MPS
torch.median(mps_inputTensor)
median of along a dim
torch.median(mps_inputTensor, dim=[int], keepdim=[Bool])