Skip to content
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

DO NOT MERGE. Testing. Wip/np122 debug1 #8030

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 34 additions & 29 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ trigger:

variables:
# Change the following along with adding new TEST_START_INDEX.
TEST_COUNT: 20
TEST_COUNT: 21

jobs:
# Mac and Linux use the same template with different matrixes
Expand All @@ -13,8 +13,8 @@ jobs:
vmImage: macOS-10.15
matrix:
py37_np118:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: 'azure_ci'
TEST_START_INDEX: 0
py39_np121:
Expand All @@ -31,97 +31,102 @@ jobs:
matrix:
py37_np118_32bit:
# 32 bit linux only has np 1.15
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
BITS32: yes
TEST_START_INDEX: 2
py37_np118_cov:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
RUN_COVERAGE: yes
RUN_FLAKE8: yes
RUN_MYPY: yes
TEST_START_INDEX: 3
py37_np118_vanilla:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
VANILLA_INSTALL: yes
TEST_START_INDEX: 4
py37_np118_tbb:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_THREADING: 'tbb'
TEST_START_INDEX: 5
py37_np118_omp:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_THREADING: omp
TEST_START_INDEX: 6
py37_np118_workqueue:
PYTHON: '3.7'
NUMPY: '1.18'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_THREADING: workqueue
TEST_START_INDEX: 7
py37_np119_doc:
PYTHON: '3.7'
NUMPY: '1.19'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
BUILD_DOC: yes
TEST_START_INDEX: 8
py37_np119_pickle5:
PYTHON: '3.7'
NUMPY: '1.19'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_PICKLE5: yes
TEST_START_INDEX: 9
py37_np120_svml:
PYTHON: '3.7'
NUMPY: '1.20'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_SVML: yes
TEST_START_INDEX: 10
py37_np121:
PYTHON: '3.7'
NUMPY: '1.21'
PYTHON: '3.8'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 11
py38_np119:
PYTHON: '3.8'
NUMPY: '1.19'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 12
py38_np120_typeguard:
PYTHON: '3.8'
NUMPY: '1.20'
NUMPY: '1.22'
CONDA_ENV: azure_ci
RUN_TYPEGUARD: yes
TEST_START_INDEX: 13
py38_np121:
PYTHON: '3.8'
NUMPY: '1.21'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 14
py39_np120:
PYTHON: '3.9'
NUMPY: '1.20'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 15
py39_np121:
PYTHON: '3.9'
NUMPY: '1.21'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 16
py310_np121:
PYTHON: '3.10'
NUMPY: '1.21'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 17
py310_np122:
PYTHON: '3.10'
NUMPY: '1.22'
CONDA_ENV: azure_ci
TEST_START_INDEX: 18

- template: buildscripts/azure/azure-windows.yml
parameters:
Expand Down
4 changes: 2 additions & 2 deletions buildscripts/azure/azure-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
PYTHON: '3.9'
NUMPY: '1.21'
CONDA_ENV: 'testenv'
TEST_START_INDEX: 18
TEST_START_INDEX: 19
py37_np118:
PYTHON: '3.7'
NUMPY: '1.18'
CONDA_ENV: 'testenv'
TEST_START_INDEX: 19
TEST_START_INDEX: 20

steps:
- task: CondaEnvironment@1
Expand Down
2 changes: 2 additions & 0 deletions buildscripts/condarecipe.local/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ requirements:
- scipy >=1.0
# CUDA Python 11.6 or later
- cuda-python >=11.6
# NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs, see #7756
- numpy !=1.22.0, !=1.22.1, !=1.22.2

test:
requires:
Expand Down
8 changes: 7 additions & 1 deletion buildscripts/incremental/setup_conda_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ conda list
# NOTE: pyyaml is used to ensure that the Azure CI config is valid
# NOTE: 32 bit linux... do not install NumPy, there's no conda package for >1.15
# so it has to come from pip later
if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" ]]; then
# NOTE: NumPy 1.22 temporarily comes from pip for the purposes of testing
if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" || "$NUMPY" == "1.22" ]]; then
conda create -n $CONDA_ENV -q -y ${EXTRA_CHANNELS} python=$PYTHON pip gitpython pyyaml
else
conda create -n $CONDA_ENV -q -y ${EXTRA_CHANNELS} python=$PYTHON numpy=$NUMPY pip gitpython pyyaml
Expand Down Expand Up @@ -86,6 +87,11 @@ if [[ "$CONDA_SUBDIR" == "linux-32" || "$BITS32" == "yes" ]] ; then
$PIP_INSTALL numpy==$NUMPY
fi

# NOTE: NumPy 1.22 temporarily comes from pip for the purposes of testing
if [[ "$NUMPY" == "1.22" ]] ; then
$PIP_INSTALL "numpy>=$NUMPY"
fi

# Install latest llvmlite build
$CONDA_INSTALL -c numba/label/dev llvmlite

Expand Down
10 changes: 10 additions & 0 deletions buildscripts/incremental/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ export PYTHONFAULTHANDLER=1
# enable new style error handling
export NUMBA_CAPTURED_ERRORS="new_style"

# Disable NumPy dispatching to AVX512_SKX feature extensions if the chip is
# reported to support the feature.
_NPY_CMD='from numpy.core._multiarray_umath import __cpu_features__ as feat; print(feat.get("AVX512_SKX", False))'
NUMPY_DETECTS_AVX512_SKX=$(python -c "$_NPY_CMD")
echo "NumPy detects AVX512_SKX: $NUMPY_DETECTS_AVX512_SKX"

if [[ "$NUMPY_DETECTS_AVX512_SKX" == "True" ]]; then
export NPY_DISABLE_CPU_FEATURES="AVX512_SKX"
fi

# deal with threading layers
if [ -z ${TEST_THREADING+x} ]; then
echo "INFO: Threading layer not explicitly set."
Expand Down
2 changes: 2 additions & 0 deletions docs/source/user/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ information.
+--------+--------------+---------------------------+----------------------------+------------------------------+-------------------+-----------------------------+
| Numba | Release date | Python | NumPy | llvmlite | LLVM | TBB |
+========+==============+===========================+============================+==============================+===================+=============================+
| 0.56.x | TBC | 3.7.x <= version < 3.11 | 1.18 <= version < 1.23 | 0.39.x | 11.x | 2021.x |
+--------+--------------+---------------------------+----------------------------+------------------------------+-------------------+-----------------------------+
| 0.55.x | 2022-01-13 | 3.7.x <= version < 3.11 | 1.18 <= version < 1.22 | 0.38.x | 11.x | 2021.x |
+--------+--------------+---------------------------+----------------------------+------------------------------+-------------------+-----------------------------+
| 0.54.x | 2021-08-19 | 3.6.x <= version < 3.10 | 1.17 <= version < 1.21 | 0.37.x | 11.x | 2021.x |
Expand Down
7 changes: 5 additions & 2 deletions numba/np/ufunc_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,12 @@ def _fill_ufunc_db(ufunc_db):
'QQ->Q': npyfuncs.np_int_udiv_impl,
'ff->f': npyfuncs.np_real_floor_div_impl,
'dd->d': npyfuncs.np_real_floor_div_impl,
'FF->F': npyfuncs.np_complex_floor_div_impl,
'DD->D': npyfuncs.np_complex_floor_div_impl,
}
if numpy_version < (1, 22): # removed in 1.22+
ufunc_db[np.floor_divide].update({
'FF->F': npyfuncs.np_complex_floor_div_impl,
'DD->D': npyfuncs.np_complex_floor_div_impl,
})

ufunc_db[np.remainder] = {
'bb->b': npyfuncs.np_int_srem_impl,
Expand Down
2 changes: 2 additions & 0 deletions numba/tests/test_ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,6 +1277,8 @@ def foo(x1, x2):
b = np.arange(10, dtype='f8')
self.assertPreciseEqual(foo(a, b), (a + b) + (a + b))

@unittest.skipIf(numpy_support.numpy_version >= (1, 22),
"Complex floor division support removed in NumPy 1.22")
def test_issue_713(self):
def foo(x,y):
return np.floor_divide(x,y)
Expand Down