[PyTorch] Fix incorrect macOS 15.0 gating in MPS backend#138022
[PyTorch] Fix incorrect macOS 15.0 gating in MPS backend#138022swolchok wants to merge 5 commits intogh/swolchok/669/basefrom
Conversation
The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138022
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 88728cd with merge base 0786b37 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This pull request was exported from Phabricator. Differential Revision: D64429453 |
The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) ghstack-source-id: 248192399 Pull Request resolved: #138022
The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D64429453 |
The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D64429453 |
|
@pytorchbot merge |
|
This PR needs to be approved by an authorized maintainer before merge. |
| #else | ||
| rsqrtTensor = [mpsGraph reverseSquareRootWithTensor:varianceEpsTensor name:nil]; | ||
| #endif | ||
| if (@available(macOS 15.0, *)) { |
There was a problem hiding this comment.
@available macros unfortunately do not work for shared libraries, you should do is_macos_13_or_newer
| if (@available(macOS 15.0, *)) { | |
| if (is_macos_13_or_newer(MacOSVersion::MACOS_VER_15_0_PLUS);) { |
There was a problem hiding this comment.
do not work
Can you elaborate? I wrote this diff because I was building on macOS 14 with a macOS-15-capable SDK, and tests were failing because reciprocalSquareRootWithTensor:name: was not available at runtime. This diff fixed that, so I'm unclear on how it doesn't work.
malfet
left a comment
There was a problem hiding this comment.
Those ifdefs were added to suppress warnings, rather than anything else when compiling on MacOS 15. We don't have a proper mechism to compile for newer macos but deploy on an older ones
…rrect macOS 15.0 gating in MPS backend" The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D64429453 |
… "[PyTorch] Fix incorrect macOS 15.0 gating in MPS backend" The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/) [ghstack-poisoned]
|
This pull request was exported from Phabricator. Differential Revision: D64429453 |
Pull Request resolved: #138022 The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use. ghstack-source-id: 248416737 Differential Revision: [D64429453](https://our.internmc.facebook.com/intern/diff/D64429453/)
|
@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 |
Stack from ghstack (oldest at bottom):
defined(__aarch64__) && !defined(CPU_CAPABILITY_SVE256)instead ofdefined(CPU_CAPABILITY_NEON)#137722The ifdef as written just checks if the macOS 15.0-capable SDK is being used. You also need a runtime gate to make sure macOS 15 is in use.
Differential Revision: D64429453