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::nextafter #109685
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/109685
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 1392c39 with merge base 0317626 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Small suggestion: As you mentioned, the MSL 3.1 supports pytorch/aten/src/ATen/mps/IndexKernels.h Lines 26 to 30 in d9fe171
|
I think he meant when that’s available he can call that function directly . I didn’t see that native function being called in this pr . In metal 3.1 time we would still need this code path to have it working for older os |
I meant we can have both implementations, native one and custom one, in the kernel and use the macro to determine which one should be used. (it's ok to have it in a follow-up, don't want to block this PR). |
Agreed . Let’s do a follow up on this case , for simple cases unless it becomes perf critical it’s nice to have consistent code path from maintenance stand point |
So I'll merge this, but y'all think it would be worth following qqaatw's idea of branching based on MSL version? I'm happy to throw that in on a follow up pr if so. |
@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 |
Fixes #77764 (comment)
Adds support for aten::nextafter to the MPS backend. Supports float and half types.
Notes: