Skip to content
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

Any plan for Windows ARM64 MSVC support? #2329

Open
m-miljkovic opened this issue Sep 16, 2024 · 2 comments
Open

Any plan for Windows ARM64 MSVC support? #2329

m-miljkovic opened this issue Sep 16, 2024 · 2 comments

Comments

@m-miljkovic
Copy link

Is there any plan to support Windows ARM64 build with MSVC?

This could be used by numpy as windows ARM64 support is in progress #27330.

@jan-wassenberg
Copy link
Member

Hi, currently there are no plans. If it is helpful for numpy we can consider it. One difficulty is that our internal support for MSVC is lacking. We'd have to rely on Github actions to test.

A perhaps bigger obstacle is that the arm_neon-inl.h implementation contains a few bits of inline assembly, which last I checked were not supported by MSVC. In my experience, the MSVC vector codegen has anyway fallen behind Clang and GCC. Is it not possible to use Clang or GCC instead?

@johnplatts
Copy link
Contributor

The IsProcessorFeaturePresent function can be used on Windows on ARM64 to check for the presence of the AArch64 Crypto and DotProd instructions, and the IsProcessorFeaturePresent function is described at https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-isprocessorfeaturepresent.

It is possible to implement dynamic dispatch on Windows on ARM64, but HWY_NEON_WITHOUT_AES and HWY_NEON are the only NEON targets currently supported on Windows on ARM64 (at least when compiling with MSVC).

It is possible to check for SVE/SVE2 support on Windows on ARM64 with updated Windows SDK or mingw-w64 headers using IsProcessorFeaturePresent(PF_ARM_SVE_INSTRUCTIONS_AVAILABLE) or IsProcessorFeaturePresent(PF_ARM_SVE2_INSTRUCTIONS_AVAILABLE), but SVE/SVE2 C++ support on Windows on ARM64 requires compiling with Clang.

To implement dynamic dispatch on Windows on ARM64, the <windows.h> header needs to be included in 'hwy/targets.cc' on Windows on ARM64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants