diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2022-10-10 06:32:50 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2022-10-11 09:13:53 -0600 |
commit | d7da7a490fc983f67a1241fe9fe409436d78f10c (patch) | |
tree | 6e9dbc48e847208e86f817055bead20acff6ac97 | |
parent | c6f8fb2f390f5694501a2a955f232c57a042ce0e (diff) | |
download | numpy-d7da7a490fc983f67a1241fe9fe409436d78f10c.tar.gz |
TST, BLD: Fix failing aarch64 wheel builds.
The aarch64 wheel build tests are failing with OOM. The new test for
complex128 dot for huge vectors is responsible as the useable memory
is incorrectly determined and the check for sufficient memory fails.
The fix here is to define the `NPY_AVAILABLE_MEM="4 GB"` environment
variable before the test call in `cibw_test_command.sh`.
-rw-r--r-- | numpy/core/tests/test_multiarray.py | 2 | ||||
-rw-r--r-- | tools/wheels/cibw_test_command.sh | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py index e27a39c3a..5dba5c68a 100644 --- a/numpy/core/tests/test_multiarray.py +++ b/numpy/core/tests/test_multiarray.py @@ -6721,7 +6721,7 @@ class TestDot: @pytest.mark.slow @pytest.mark.parametrize("dtype", [np.float64, np.complex128]) - @requires_memory(free_bytes=9*10**9) # complex case needs 8GiB+ + @requires_memory(free_bytes=18e9) # complex case needs 18GiB+ def test_huge_vectordot(self, dtype): # Large vector multiplications are chunked with 32bit BLAS # Test that the chunking does the right thing, see also gh-22262 diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 92252d9cd..cbc735fc0 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -11,6 +11,10 @@ if [[ $RUNNER_OS == "Windows" ]]; then PY_DIR=$(python -c "import sys; print(sys.prefix)") mkdir $PY_DIR/libs fi + +# Set available memory value to avoid OOM problems on aarch64. +# See gh-22418. +export NPY_AVAILABLE_MEM="4 GB" python -c "import sys; import numpy; sys.exit(not numpy.test('full'))" python $PROJECT_DIR/tools/wheels/check_license.py |