-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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] Add support for aten::median for MPS backend #87220
Comments
@DenisVieriu97 |
I sent a Pull request for torch.median(input_tensor). test passed Now I am working on median with dim value But it will only work on macOS Ventura |
will check macOS Ventura like this PR I need a small help in Successfully added median_mps of entire tensor and its implementation function Now trying to add median op with dim pytorch/aten/src/ATen/native/native_functions.yaml Lines 3500 to 3505 in 97be8da
and gave function signature like below replacing my median op name pytorch/aten/src/ATen/native/mps/operations/ReduceOps.mm Lines 1374 to 1386 in 7382c88
But this gives error while building
What should be median_out_mps with dim implementation function signature |
This function signature is working
Going ahead with this. |
## 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
🐛 Describe the bug
First time contributors are welcome! 🙂
Add support for aten::median for MPS backend. Generic support for adding operations to MPS backend is captured here: https://github.com/pytorch/pytorch/wiki/MPS-Backend#adding-op-for-mps-backend
Versions
N/A
cc @kulinseth @albanD @malfet @razarmehr @abhudev
The text was updated successfully, but these errors were encountered: