GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #29174

New issue
Copy link
New issue
Copy link
Closed
#29215
Closed
ENH: Provide NumPy Wheels for Windows on ARM Compiled with LLVM Toolchain#29174
#29215
Copy link
Labels
14 - Release32 - InstallationProblems installing or compiling NumPycomponent: SIMDIssues in SIMD (fast instruction sets) code or machinery

Description

@MugundanMCW
MugundanMCW
opened on Jun 11, 2025
Issue body actions

Proposed 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

Activity

  1. rgommers commented on Jun 11, 2025

    @rgommers
    rgommers
    on Jun 11, 2025
    Member
    More actions

    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)?

  2. MugundanMCW commented on Jun 11, 2025

    @MugundanMCW
    MugundanMCW
    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:

    Image

    Image

    • 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

  3. rgommers
    added
    14 - Release
    component: SIMDIssues in SIMD (fast instruction sets) code or machinery
    32 - InstallationProblems installing or compiling NumPy
    on Jun 11, 2025
  4. rgommers commented on Jun 11, 2025

    @rgommers
    rgommers
    on Jun 11, 2025
    Member
    More actions

    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
  5. Mousius commented on Jun 12, 2025

    @Mousius
    Mousius
    on Jun 12, 2025
    Member
    More actions

    @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.

    Reacted by MUGUNDAN
  6. rgommers commented on Jun 13, 2025

    @rgommers
    rgommers
    on Jun 13, 2025
    Member
    More actions

    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?

    Reacted by MUGUNDAN
  7. MugundanMCW commented on Jun 13, 2025

    @MugundanMCW
    MugundanMCW
    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?

  8. Mousius commented on Jun 13, 2025

    @Mousius
    Mousius
    on Jun 13, 2025
    Member
    More actions

    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?

    Reacted by MUGUNDAN
  9. MugundanMCW commented on Jun 13, 2025

    @MugundanMCW
    MugundanMCW
    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?

  10. rgommers commented on Jun 13, 2025

    @rgommers
    rgommers
    on Jun 13, 2025
    Member
    More actions

    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.

    Reacted by MUGUNDAN
  11. Mousius
    closed this as completedin #29215on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    14 - Release32 - InstallationProblems installing or compiling NumPycomponent: SIMDIssues in SIMD (fast instruction sets) code or machinery

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.