-
Notifications
You must be signed in to change notification settings - Fork 3.2k
cmake file changes for macOS universal2 support #8953
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
Conversation
This PR is split from #8754 |
Can you also disable this when the |
Disable what? Sorry I lose the context. |
If we try to build universal binary when |
@snnn This affects POWER10 build. |
### Description In #8953 I introduced a change in our onnxruntime_mlas.cmake that it enables "ASM_MASM" cmake language for all Windows build. ```cmake enable_language(ASM_MASM) ``` Before the change, it is only enabled when onnxruntime_target_platform equals to x64. However, cmake 3.26 added a new language: ASM_MARMASM. According to cmake's manual, ASM_MASM is for Microsoft Assembler ASM_MARMASM is for Microsoft ARM Assembler. This one is new in cmake 3.26. We should choose the right one according to ${onnxruntime_target_platform}.
### Description In microsoft#8953 I introduced a change in our onnxruntime_mlas.cmake that it enables "ASM_MASM" cmake language for all Windows build. ```cmake enable_language(ASM_MASM) ``` Before the change, it is only enabled when onnxruntime_target_platform equals to x64. However, cmake 3.26 added a new language: ASM_MARMASM. According to cmake's manual, ASM_MASM is for Microsoft Assembler ASM_MARMASM is for Microsoft ARM Assembler. This one is new in cmake 3.26. We should choose the right one according to ${onnxruntime_target_platform}.
Description:
"Universal2" allows us creating a single binary that runs natively on both Apple silicon and Intel-based Mac computers. There are two ways of doing this:
The second one already works. The first one is what I'm providing. You can try the new thing in a way like:
To find more information about Universal2, please
https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
Motivation and Context