Skip to content

Conversation

@swolchok
Copy link
Contributor

@swolchok swolchok commented Oct 15, 2024

Stack from ghstack (oldest at bottom):

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

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]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 15, 2024

🔗 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 Failures

As of commit 88728cd with merge base 0786b37 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64429453

swolchok added a commit that referenced this pull request Oct 15, 2024
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]
@facebook-github-bot
Copy link
Contributor

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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64429453

@swolchok
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 16, 2024

This PR needs to be approved by an authorized maintainer before merge.

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 16, 2024
Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

#else
rsqrtTensor = [mpsGraph reverseSquareRootWithTensor:varianceEpsTensor name:nil];
#endif
if (@available(macOS 15.0, *)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@available macros unfortunately do not work for shared libraries, you should do is_macos_13_or_newer

Suggested change
if (@available(macOS 15.0, *)) {
if (is_macos_13_or_newer(MacOSVersion::MACOS_VER_15_0_PLUS);) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]
@facebook-github-bot
Copy link
Contributor

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]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64429453

swolchok added a commit that referenced this pull request Oct 16, 2024
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/)
@swolchok swolchok requested a review from malfet October 16, 2024 21:24
@swolchok
Copy link
Contributor Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your 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

Advanced Debugging
Check the merge workflow status
here

@github-actions github-actions bot deleted the gh/swolchok/669/head branch November 17, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/mps Run MPS tests (subset of trunk) ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: mps Release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants