Skip to content

Refactor CI to produce 64-bit integer interface wheels for WoA #199

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions .github/workflows/windows-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,24 @@ env:
CHERE_INVOKING: "yes"
BASH_PATH: "C:\\Program Files\\Git\\bin\\bash.exe"
PLAT: arm64
INTERFACE64: 0
BUILD_BITS: 32

jobs:
build:
runs-on: windows-11-arm
timeout-minutes: 90

strategy:
matrix:
include:
- INTERFACE64: 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is anyone using 32-but builds of Python for Windows on ARM?

If so, I guess we do need the INTERFACE64=0; BUILD_BITS=32 option. But I guess we also need an INTERFACE64=0; BUILD_BITS=64 option, for people building Numpy or Scipy with 32-bit interfaces, but 64-bit builds.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, 32-bit Python for Windows on ARM is not a thing, there's only win_arm64.

We do need LP64 (scipy-openblas32 ) and ILP64 (scipy-openblas64) wheels though, that's orthogonal to interpreter bitness.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, I guess we do need the INTERFACE64=0; BUILD_BITS=32 option. But I guess we also need an INTERFACE64=0; BUILD_BITS=64 option, for people building Numpy or Scipy with 32-bit interfaces, but 64-bit builds.

Maybe I was incorrect here - but my comment was meant to say that we do not want or need a INTERFACE64=0; BUILD_BITS=32 build - as we have here, but we do want and need an INTERFACE64=0; BUILD_BITS=64 option, that I think we do not have.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the matrix/environment variables needs improvement. Both wheels can be imported by 64-bit python win-arm64.

The "32-bit" build uses INTERFACE64: 0, BUILD_BITS: 32. It prints Building for 64-bit binary, 32-bit interface at the beginning of thebuild step, and later prints out Compiling a 64-bit binary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @matthew-brett,

Just to clarify:

  • In our workflow, BUILD_BITS does not refer to the binary architecture — it always builds 64-bit binaries for WoA. Instead, BUILD_BITS maps to the integer interface width used by OpenBLAS:

  • INTERFACE64=0 → 32-bit integer interface → BUILD_BITS=32 → scipy_openblas32

  • INTERFACE64=1 → 64-bit integer interface → BUILD_BITS=64 → scipy_openblas64

So we already have both:

  • INTERFACE64=0; BUILD_BITS=32 (LP64)
  • INTERFACE64=1; BUILD_BITS=64 (ILP64)

We use the BUILD_BITS variable purely as a naming and testing label — as seen here in the CI script:
windows-arm.yml#L76-L80

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we then remove BUILD_BITS on the basis that it's confusing, and have some variable like INTERFACE_BITS set internally to 32 for INTERFACE64=0 etc?

BUILD_BITS: 64
- INTERFACE64: 0
BUILD_BITS: 32

env:
INTERFACE64: ${{ matrix.INTERFACE64 }}
BUILD_BITS: ${{ matrix.BUILD_BITS }}

steps:

- uses: actions/checkout@v4.1.1
Expand Down Expand Up @@ -55,19 +65,19 @@ jobs:
- name: Build
run: |
git submodule update --init --recursive
.\tools\build_steps_win_arm64.bat
if ($env:INTERFACE64 -eq "1") { .\tools\build_steps_win_arm64.bat 64 64 } else { .\tools\build_steps_win_arm64.bat }

- name: Pack
run: |
cd local
cp -r "scipy_openblas${env:BUILD_BITS}" $env:BUILD_BITS
7z a ../builds/openblas-${env:PLAT}-${env:INTERFACE64}.zip -tzip $env:BUILD_BITS

- name: Test 32-bit interface wheel
- name: Test ${{ matrix.BUILD_BITS }}-bit interface wheel
run: |
python -m pip install --no-index --find-links dist scipy_openblas32
python -m scipy_openblas32
python -c "import scipy_openblas32; print(scipy_openblas32.get_pkg_config())"
python -m pip install --no-index --find-links dist scipy_openblas${env:BUILD_BITS}
python -m scipy_openblas${env:BUILD_BITS}
python -c "import scipy_openblas${env:BUILD_BITS}; print(scipy_openblas${env:BUILD_BITS}.get_pkg_config())"

- uses: actions/upload-artifact@v4.3.0
with:
Expand Down
Loading