Repository navigation
CI: Build and test wheels on Windows on ARM - #31
Merged
Merged
Conversation
Add windows-11-arm to the build matrix for Python 3.13 to 3.15, the versions for which statsmodels has win_arm64 wheels, so that the wheels can be tested. CIBW_ARCHS_WINDOWS is native, which builds AMD64 on windows-latest and ARM64 on windows-11-arm. numpy's OpenBLAS on Windows on ARM crashes in numpy.linalg.inv and solve of 23x23 to 31x31 matrices when it starts with one thread (numpy/numpy#29442, bashtage/arch#1003), and it reads OMP_NUM_THREADS when OPENBLAS_NUM_THREADS is not set. The thread limits are now set in a step that skips Windows on ARM, where a step checks that none is set. The limit for OpenBLAS was misspelled OPENLAS_NUM_THREADS; OpenBLAS was still limited through OMP_NUM_THREADS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds and tests arch wheels on Windows on ARM (ARM64), on GitHub's
windows-11-armrunner. bashtage/arch#1003 found that arch builds and passes its whole test suite there, with no BLAS thread limit.Changes
windows-11-armforcp313,cp314andcp315. statsmodels haswin_arm64wheels only from Python 3.13, so wheels for 3.10 to 3.12 couldn't be tested. numpy, SciPy and pandas have wheels for all three Pythons.CIBW_ARCHS_WINDOWS: native: builds AMD64 onwindows-latest, as before, and ARM64 onwindows-11-arm.envto a step that sets them on every runner exceptwindows-11-arm. Onwindows-11-arm, a step instead fails if any limit is set.Why Windows on ARM can't have a thread limit
In the OpenBLAS of every numpy
win_arm64wheel, from 2.3.0 to the nightly,numpy.linalg.invandsolvecrash with an access violation for 23×23 to 31×31 matrices when OpenBLAS starts with one thread (numpy/numpy#29442). arch's unit root tests use matrices of those sizes. OpenBLAS also readsOMP_NUM_THREADSwhenOPENBLAS_NUM_THREADSisn't set, soOMP_NUM_THREADS=1alone is enough to cause the crash. With no limit, OpenBLAS uses the runner's 4 cores and every test passes.The limit for OpenBLAS was misspelled
OPENLAS_NUM_THREADS. Fixing it changes nothing in practice: OpenBLAS was already limited to one thread throughOMP_NUM_THREADS. On Linux, cibuildwheel runs the tests in a container that doesn't get these variables, so Linux is unaffected either way.Checked locally
actionlintandcheck-jsonschema(GitHub workflow schema) report no problems.GITHUB_ENV. The check passes with no limit, and fails whenOMP_NUM_THREADSorGOTO_NUM_THREADSis set.pip wheel .on these runners for Python 3.13, 3.14 and 3.15, and cibuildwheel's build is the first real test of this setup.🤖 Generated with Claude Code