Skip to content

[CI] Compile on M1 natively#95719

Closed
malfet wants to merge 3 commits intomasterfrom
malfet/build-m1-binaries-natively
Closed

[CI] Compile on M1 natively#95719
malfet wants to merge 3 commits intomasterfrom
malfet/build-m1-binaries-natively

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented Feb 28, 2023

We have plenty of runners now, let's use them for compilation as well.
To achieve that, remove xcode-version: "13.3.1" property and tweak Metal framework detection logic to work with command line tools(which are installed in /Library/Developer/CommandLineTools) and SDK is in /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk) rather than full Xcode installation.

TODO: Fix/enable OpenMP accelerated native builds (which are currently broken with OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.), but this matches existing behavior as cross-builds are compiled with OpenMP disabled.

@malfet malfet requested a review from a team as a code owner February 28, 2023 18:30
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Feb 28, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/95719

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 2737bdc:
💚 Looks good so far! There are no failures yet. 💚

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

@pytorch-bot pytorch-bot Bot added the release notes: releng release notes category label Feb 28, 2023
@malfet malfet added the ciflow/mps Run MPS tests (subset of trunk) label Feb 28, 2023
We have plenty of runners now, let's use them for compilation as well
@malfet malfet force-pushed the malfet/build-m1-binaries-natively branch from 78fc9cf to d242d43 Compare March 1, 2023 00:45
Copy link
Copy Markdown
Contributor

@huydhn huydhn left a comment

Choose a reason for hiding this comment

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

This is nice!!

@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 1, 2023
@malfet
Copy link
Copy Markdown
Contributor Author

malfet commented Mar 1, 2023

@pytorchbot merge -f "All M1 builds and tests are green"

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

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

@malfet malfet deleted the malfet/build-m1-binaries-natively branch March 1, 2023 14:35
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 2, 2023
We have plenty of runners now, let's use them for compilation as well.
To achieve that, remove `xcode-version: "13.3.1"` property and tweak Metal framework detection logic to work with command line tools(which are installed in `/Library/Developer/CommandLineTools`) and SDK is in `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`) rather than full Xcode installation.

TODO: Fix/enable OpenMP accelerated native builds (which are currently broken with `OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.`), but this matches existing behavior as cross-builds are compiled  with OpenMP disabled.
Pull Request resolved: pytorch/pytorch#95719
Approved by: https://github.com/huydhn
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 5, 2023
We have plenty of runners now, let's use them for compilation as well.
To achieve that, remove `xcode-version: "13.3.1"` property and tweak Metal framework detection logic to work with command line tools(which are installed in `/Library/Developer/CommandLineTools`) and SDK is in `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`) rather than full Xcode installation.

TODO: Fix/enable OpenMP accelerated native builds (which are currently broken with `OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.`), but this matches existing behavior as cross-builds are compiled  with OpenMP disabled.
Pull Request resolved: pytorch/pytorch#95719
Approved by: https://github.com/huydhn
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 5, 2023
We have plenty of runners now, let's use them for compilation as well.
To achieve that, remove `xcode-version: "13.3.1"` property and tweak Metal framework detection logic to work with command line tools(which are installed in `/Library/Developer/CommandLineTools`) and SDK is in `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`) rather than full Xcode installation.

TODO: Fix/enable OpenMP accelerated native builds (which are currently broken with `OMP: Error #15: Initializing libomp.dylib, but found libomp.dylib already initialized.`), but this matches existing behavior as cross-builds are compiled  with OpenMP disabled.
Pull Request resolved: pytorch/pytorch#95719
Approved by: https://github.com/huydhn
pruthvistony added a commit to ROCm/pytorch that referenced this pull request May 2, 2023
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 25, 2026
We have plenty of runners now, let's use them for compilation as well.
To achieve that, remove `xcode-version: "13.3.1"` property and tweak Metal framework detection logic to work with command line tools(which are installed in `/Library/Developer/CommandLineTools`) and SDK is in `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk`) rather than full Xcode installation.

TODO: Fix/enable OpenMP accelerated native builds (which are currently broken with `OMP: Error pytorch#15: Initializing libomp.dylib, but found libomp.dylib already initialized.`), but this matches existing behavior as cross-builds are compiled  with OpenMP disabled.
Pull Request resolved: pytorch#95719
Approved by: https://github.com/huydhn
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 Merged release notes: releng release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants