GeezerVison is showing github.com — ENH: Provide NumPy Wheels for Windows on ARM Compiled with LLVM Toolchain · Issue #29174 · numpy/numpy
ENH: Provide NumPy Wheels for Windows on ARM Compiled with LLVM Toolchain #29174DescriptionProposed new feature or change:
Hi Developers,
- NumPy currently provides four baseline CPU features for ARMv8 architectures: NEON, NEON_FP16, NEON_VFPV4, and ASIMD, along with three CPU dispatch features: ASIMDDP, ASIMDHP, and ASIMDFHM.
- The NumPy v2.3.0 release includes Windows on ARM (WoA) binaries compiled using the MSVC toolchain.
- However, MSVC lacks support for certain C++23 features, which prevents enabling the CPU dispatch features in the WoA builds.
- On the other hand, building NumPy with the latest LLVM toolchain using clang-cl enables full support for all CPU features on WoA, covering both baseline and dispatch optimizations.
- Providing official NumPy wheels for Windows on ARM built with the LLVM toolchain (clang-cl) would be highly appreciated, as it would enable full CPU feature support and improve performance for users.
Thanks!
cc: @rgommers @matthew-brett Activityrgommers commented on Jun 11, 2025
However, MSVC lacks support for certain C++23 features, which prevents enabling the CPU dispatch features in the WoA builds.
It shouldn't require C++17. NumPy requires only C++17, and we're building with an explicit -std=c++17 compile flag.
Could you elaborate on what actually goes missing (e.g. from a build log) and, if possibe, the performance impact of that based on running some of the relevant asv benchmarks (see spin bench)? MugundanMCW commented on Jun 11, 2025 ContributorAuthor More actions @rgommers
- Initially, I created another issue related to a build with the llvm toolchain for WoA, which can give a better description.
- To be precise, MSVC does not support extended precision floating point(float16_t) as I can see from MSVC C\C++ features support docs, due to which the CPU dispatch features are disabled. Refer to image below:


- Regarding the performance impact, I can be sure that the NEON-based quicksort from highway is also disabled while compiling with MSVC, whereas it is enabled upon using the LLVM toolchain, due to which functions that use sort are performing poorly for WoA.
- I have attached a minimal benchmark sheet that compares NumPy performance between MSVC and LLVM binary:
NumPy W0A- MSVC vs LLVM.zip rgommers commented on Jun 11, 2025 That assessment doesn't seem quite right. This is the output:
Message: During parsing cpu-dispatch: The following CPU features were ignored due to platform incompatibility or lack of support:
"XOP FMA4"
Test features "NEON NEON_FP16 NEON_VFPV4 ASIMD" : Supported
Test features "ASIMDHP" : Unsupported due to Implied feature "NEON" is not supported
Test features "ASIMDFHM" : Unsupported due to Implied feature "NEON" is not supported
Test features "SVE" : Unsupported due to Implied feature "NEON" is not supported
Configuring npy_cpu_dispatch_config.h using configuration
Message:
CPU Optimization Options
baseline:
Requested : min
Enabled : NEON NEON_FP16 NEON_VFPV4 ASIMD
dispatch:
Requested : max -xop -fma4
Enabled :
The key bit is: Test features "NEON NEON_FP16 NEON_VFPV4 ASIMD" : Supported. So those SIMD features are used.
The ASIMDHP, ASIMDFHM and SVE output is confusion though, I suspect that that's a bug in our meson_cpu code since the message claims it's due to NEON not being supported but NEON is in the baseline.
@Mousius since this is Arm SIMD, maybe you want to have a look here? Reacted by Christopher Sidebottom Mousius commented on Jun 12, 2025 @rgommers, you're right, there was a bug in the check code for MSVC, see #29199.
@MugundanMCW is also right, as illustrated by that same PR. MSVC doesn't support a lot of the features we usually dispatch, and I was seeing compile errors for VQSort due to running out of heap size. rgommers commented on Jun 13, 2025 Thanks @Mousius. 🙏🏼 Then it sounds like switching to Clang-cl is a good idea either way. @MugundanMCW want to open a PR, using the same install method as in your SciPy PR? MugundanMCW commented on Jun 13, 2025 ContributorAuthor More actions @rgommers
Do I need to create a reusable action for LLVM else adding installation steps to LLVM in wheels.yml should be fine? Mousius commented on Jun 13, 2025
Thanks @Mousius. 🙏🏼 Then it sounds like switching to Clang-cl is a good idea either way. @Mugundanmcw want to open a PR, using the same install method as in your SciPy PR?
Agree, looking at the other failures, this could become a lot more involved to fix.
@rgommers
Do I need to create a reusable action for LLVM else adding installation steps to LLVM in wheels.yml should be fine?
It'd be good to have a reusable step, so we can keep windows_arm64.yml consistent with the wheel build. Could you also update that file to use clang-cl? MugundanMCW commented on Jun 13, 2025 ContributorAuthor More actions @Mousius & @rgommers
The current CI environment (windows_arm64.yml) looks like a cross-compilation and packaging of NumPy wheels for Windows ARM64 architecture, which needs to be completely changed for native compilation and validation for Windows ARM64.
Rather than having a separate workflow for Win-ARM64 under windows_arm.yml for LLVM, is it fine to integrate in the existing windows.yml workflow? rgommers commented on Jun 13, 2025
It'd be good to have a reusable step
agreed
is it fine to integrate in the existing windows.yml workflow?
Yes please, all Windows jobs in windows.yml is nicer.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|