Change CMake config to enable universal binary for Mac#50243
Closed
janeyx99 wants to merge 2 commits intopytorch:masterfrom
Closed
Change CMake config to enable universal binary for Mac#50243janeyx99 wants to merge 2 commits intopytorch:masterfrom
janeyx99 wants to merge 2 commits intopytorch:masterfrom
Conversation
Contributor
💊 CI failures summary and remediationsAs of commit 8f5ab7c (more details on the Dr. CI page):
1 failure not recognized by patterns:
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. This comment has been revised 29 times. |
49e2fe2 to
a49f4d5
Compare
a49f4d5 to
2748649
Compare
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@janeyx99 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
This comment has been minimized.
This comment has been minimized.
walterddr
reviewed
Jan 8, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
malfet
approved these changes
Jan 8, 2021
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
@janeyx99 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Contributor
facebook-github-bot
pushed a commit
that referenced
this pull request
Feb 12, 2021
Summary: Tests cross-compilation of ARM64 architecture in MacOS CI. This should be merged after PR #50243 and #50922 (adding a fix). The reason we pin the wheel to be version 0.36.2 is because lower versions cannot handle c38 as a tag for the wheel. Pull Request resolved: #49751 Reviewed By: albanD Differential Revision: D26411133 Pulled By: janeyx99 fbshipit-source-id: 00a5cf597aee10adea1547579270cb3b38732563
xsacha
pushed a commit
to xsacha/pytorch
that referenced
this pull request
Mar 31, 2021
Summary: Tests cross-compilation of ARM64 architecture in MacOS CI. This should be merged after PR pytorch#50243 and pytorch#50922 (adding a fix). The reason we pin the wheel to be version 0.36.2 is because lower versions cannot handle c38 as a tag for the wheel. Pull Request resolved: pytorch#49751 Reviewed By: albanD Differential Revision: D26411133 Pulled By: janeyx99 fbshipit-source-id: 00a5cf597aee10adea1547579270cb3b38732563
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: This PR is a step towards enabling cross compilation from x86_64 to arm64. The following has been added: 1. When cross compilation is detected, compile a local universal fatfile to use as protoc. 2. For the simple compile check in MiscCheck.cmake, make sure to compile the small snippet as a universal binary in order to run the check. **Test plan:** Kick off a minimal build on a mac intel machine with the macOS 11 SDK with this command: ``` CMAKE_OSX_ARCHITECTURES=arm64 USE_MKLDNN=OFF USE_QNNPACK=OFF USE_PYTORCH_QNNPACK=OFF BUILD_TEST=OFF USE_NNPACK=OFF python setup.py install ``` (If you run the above command before this change, or without macOS 11 SDK set up, it will fail.) Then check the platform of the built binaries using this command: ``` lipo -info build/lib/libfmt.a ``` Output: - Before this PR, running a regular build via `python setup.py install` (instead of using the flags listed above): ``` Non-fat file: build/lib/libfmt.a is architecture: x86_64 ``` - Using this PR: ``` Non-fat file: build/lib/libfmt.a is architecture: arm64 ``` Pull Request resolved: pytorch#50243 Reviewed By: malfet Differential Revision: D25849955 Pulled By: janeyx99 fbshipit-source-id: e9853709a7279916f66aa4c4e054dfecced3adb1
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 24, 2026
Summary: Tests cross-compilation of ARM64 architecture in MacOS CI. This should be merged after PR pytorch#50243 and pytorch#50922 (adding a fix). The reason we pin the wheel to be version 0.36.2 is because lower versions cannot handle c38 as a tag for the wheel. Pull Request resolved: pytorch#49751 Reviewed By: albanD Differential Revision: D26411133 Pulled By: janeyx99 fbshipit-source-id: 00a5cf597aee10adea1547579270cb3b38732563
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a step towards enabling cross compilation from x86_64 to arm64.
The following has been added:
Test plan:
Kick off a minimal build on a mac intel machine with the macOS 11 SDK with this command:
(If you run the above command before this change, or without macOS 11 SDK set up, it will fail.)
Then check the platform of the built binaries using this command:
Output:
python setup.py install(instead of using the flags listed above):