Skip to content

[sklearn#33715] Use clang-cl (LLVM) compiler for Windows ARM64 wheel builds #381

Closed

Description

@godofecht

Mirrored from scikit-learn#33715

Original title: Use clang-cl (LLVM) compiler for Windows ARM64 wheel builds
Original labels: Build / CI, Needs Investigation
Created: 2026-04-09T16:53:30Z


Describe the workflow you want to enable

Scikit-learn currently ships ARM64 Windows wheels built with MSVC. This proposal is to switch the Windows ARM64 wheel build to use clang-cl in the CI pipeline for improved performance and build reliability.

Initial scikit-learn implementation already exists
A working PR switching the win_arm64 CI wheel build to clang-cl was raised and demonstrates the change builds and passes tests successfully.
scikit-learn PR #33435

Motivation:

The need for clang-cl on Windows ARM64 is well documented across the ecosystem:

CPython acknowledged the ARM64 Windows performance gap
Python release binaries on ARM64 Windows show significantly lower performance compared to x64, traced to MSVC's weaker ARM64 auto-vectorisation. This is the upstream root cause that affects all Python packages built with MSVC on this platform.
python/cpython #134524

Community discussion on clang-cl for Windows ARM64
A dedicated thread on Python.org Ideas discusses using clang-cl to address the performance gap in Windows ARM64 Python packages, with broad agreement from the scientific Python community that LLVM is the right path forward for this platform.
Python.org Discussions

NumPy formally proposed and adopted clang-cl for win_arm64
NumPy raised this as an enhancement issue to provide Windows ARM64 wheels compiled with the LLVM toolchain, citing the same MSVC ARM64 vectorisation gap. This was subsequently implemented and NumPy now ships win_arm64 wheels built with clang-cl.
numpy/numpy #29174
numpy/numpy #28106
numpy/numpy PR #28246

NumPy and SciPy
scikit-learn's two core dependencies already ship win_arm64 wheelsbuilt with clang-cl.

Describe your proposed solution

Switch the win_arm64 CI wheel build from MSVC to clang-cl (LLVM). The change is scoped to Windows ARM64 only all other platforms (win_amd64, Linux, macOS) remain unchanged.

Test suite

All scikit-learn tests pass with the clang-cl build. The implementation includes a fix for a uint32_t redefinition that
occurs specifically with clang-cl on Windows.

Describe alternatives you've considered, if relevant

No response

Additional context

No response


Flow context

This issue is mirrored from scikit-learn to explore whether Flow encounters the same problem or can approach it differently. Add analysis below.

Activity

  1. added
    scikit-learn-parity
    on Aug 10, 2026
  2. godofecht commented on Aug 10, 2026

    @godofecht
    ContributorAuthor

    Moved to 13 in the flow-scikit repository. Further library-specific triage and implementation will happen there.

  3. godofecht commented on Aug 10, 2026

    @godofecht
    ContributorAuthor

    Moved to 15 in the flow-scikit repository. Further library-specific triage and implementation will happen there.

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

    scikit-learn-parity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions