Skip to content

Commit

Permalink
TST, BLD: Fix failing aarch64 wheel builds.
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
charris committed Oct 11, 2022
1 parent 1cbd127 commit f4a3195
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion numpy/core/tests/test_multiarray.py
Expand Up @@ -6693,7 +6693,7 @@ def assert_dot_close(A, X, desired):

@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
Expand Down
6 changes: 5 additions & 1 deletion tools/wheels/cibw_test_command.sh
Expand Up @@ -11,7 +11,11 @@ if [[ $RUNNER_OS == "Windows" ]]; then
PY_DIR=$(python -c "import sys; print(sys.prefix)")
mkdir $PY_DIR/libs
fi
python -c "import sys; import numpy; sys.exit(not numpy.test('full', extra_argv=['-vvv']))"

# 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
if [[ $UNAME == "Linux" || $UNAME == "Darwin" ]] ; then
Expand Down

0 comments on commit f4a3195

Please sign in to comment.