-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add support for building for Windows ARM64 devices #3430
base: dev
Are you sure you want to change the base?
Add support for building for Windows ARM64 devices #3430
Conversation
Filed as internal issue #USD-10450 ❗ Please make sure that a signed CLA has been submitted! |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
CLA sorted - approved by Tim Palmer |
Any reason why the testWrapper.py change you mentioned isn't included here? Otherwise, lgtm |
I figured it was more related to the version of python I have installed ( |
@@ -393,7 +393,10 @@ def RunCMake(context, force, extraArgs = None): | |||
|
|||
# Note - don't want to add -A (architecture flag) if generator is, ie, Ninja | |||
if IsVisualStudio2019OrGreater() and "Visual Studio" in generator: | |||
generator = generator + " -A x64" | |||
if "ARM" in os.environ.get('PROCESSOR_IDENTIFIER'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could the platform
module be used here?
https://docs.python.org/3/library/platform.html#module-platform
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(repost from correct account)
It could be, but problems arise when running an emulated x64 version of python (which is easy to do by mistake, as that's what the website gives you by default).
This way checks the name of the processor directly, which is not affected by emulation.
"Python is currently switched off due to lack of support for PySide on these devices. I am looking at that seperately." Hi @anthony-linaro , per our call yesterday, you also mentioned that the python bindings are failing to compile -- can you post the error messages you are seeing there? "I also had to disable imaging, as building boost appears to be broken... " @sunyab , is it expected that the command line
would attempt to build boost in v24.11+ ? Thanks all! |
Hi @asluk - I have tried to reproduce the compilation errors, but am unable, so will chalk it down to an env issue - with things set up properly, I have most of the tests passing. However, when I run
I have attached the output file from the tests to this comment. Are these tests expected to fail? If not, do you have any idea why they might be? All env paths are set as instructed after build ( |
@anthony-linaro I don't think those test failures are expected -- can you try rebasing your branch to be on top of the "dev" branch? That is the most up to date commit. Thanks and happy new year! |
(sorry for the late reply, was out on vacation) Yes, I would expect that to build boost in v24.11+. When imaging is enabled the |
Hi @anthony-linaro, the |
Hi both, thanks for the responses! @sunyab You're right, those python issues are now fixed, thanks to the suggestion from @asluk to merge dev. Sadly, the list of errors has now changed, and I now get this:
I have once again attached the logs: LastTest.log Any suggestions of where I could start to look? It looks like it's not seeing the "Tf" python module. The path variable is correct, and added as specified when building (ie, modified PATH and PYTHONPATH) - is there another one that got missed somewhere? Was there an extra step required between |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -393,7 +393,10 @@ def RunCMake(context, force, extraArgs = None): | |||
|
|||
# Note - don't want to add -A (architecture flag) if generator is, ie, Ninja | |||
if IsVisualStudio2019OrGreater() and "Visual Studio" in generator: | |||
generator = generator + " -A x64" | |||
if "ARM" in os.environ.get('PROCESSOR_IDENTIFIER'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be good to follow the convention in apple_utils.py and extract this into GetHostArch https://github.com/PixarAnimationStudios/OpenUSD/blob/release/build_scripts/apple_utils.py#L66
@@ -393,7 +393,10 @@ def RunCMake(context, force, extraArgs = None): | |||
|
|||
# Note - don't want to add -A (architecture flag) if generator is, ie, Ninja | |||
if IsVisualStudio2019OrGreater() and "Visual Studio" in generator: | |||
generator = generator + " -A x64" | |||
if "ARM" in os.environ.get('PROCESSOR_IDENTIFIER'): | |||
generator = generator + " -A arm64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super familiar with how its configured, but you might also need to support ARM64EC on Windows too ? https://learn.microsoft.com/en-us/windows/arm/arm64ec
@@ -35,15 +35,17 @@ | |||
#if defined(i386) || defined(__i386__) || defined(__x86_64__) || \ | |||
defined(_M_IX86) || defined(_M_X64) | |||
#define ARCH_CPU_INTEL | |||
#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) | |||
#elif defined(__arm__) || defined(__aarch64__) || defined(_M_ARM) || \ | |||
defined(_M_ARM64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Along the lines of @dgovil's comment in build_usd.py
, I think we'd also want to include defined(_M_ARM64EC)
here and below?
I didn't add support for ARM64EC, as I didn't have a use-case for it - if
you guys have one internally I'm unaware of, I can try and add support.
The biggest issue with ARM64EC will likely be around the use of any
intrinsics - as it defines both _M_ARM64EC, and _M_X64, use of intrinsics
that could be considered "safely" gated behind _M_X64 (or similar) are
suddenly not so safe, so I'd need to go over the source with a fine tooth
comb. Not impossible, but requires substantially more work than a plain old
ARM64 enablement.
|
That's fair. At the very least, I'd suggest then adding a caveat to the README somewhere to document that EC isn't supported yet? |
Description of Change(s)
Add support for Windows ARM64 devices.
This was tested using the following command line:
Python is currently switched off due to lack of support for PySide on these devices. I am looking at that seperately.
I also had to disable imaging, as building boost appears to be broken when using newer CMake versions (similar issue to #3285)
TBB is set to OneTBB, as 2020u3 doesn't support these devices.
I also had to make a small modification in
testWrapper.py
, and change line 134 topathPattern = pathPattern + r'(\S*)'
, as otherwise the escape sequence was invalid.Checklist
[x] I have created this PR based on the dev branch
[x] I have followed the coding conventions
[ ] I have added unit tests that exercise this functionality (Reference:testing guidelines)
[x] I have verified that all unit tests pass with the proposed changes
[x] I have submitted a signed Contributor License Agreement (Reference:
Contributor License Agreement instructions)