Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into py3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sklam committed Mar 14, 2023
2 parents 27dd56a + ec52102 commit 2c7926d
Show file tree
Hide file tree
Showing 203 changed files with 9,159 additions and 3,852 deletions.
4 changes: 1 addition & 3 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ exclude =
__init__.py
# Ignore vendored files
numba/cloudpickle/*
versioneer.py
# Grandfather in existing failing files. This list should shrink over time
numba/stencils/stencil.py
numba/core/transforms.py
Expand Down Expand Up @@ -73,7 +74,6 @@ exclude =
numba/core/registry.py
numba/core/imputils.py
numba/cpython/builtins.py
numba/core/cpu.py
numba/misc/quicksort.py
numba/core/callconv.py
numba/cpython/randomimpl.py
Expand Down Expand Up @@ -141,7 +141,6 @@ exclude =
numba/tests/test_slices.py
numba/tests/test_mandelbrot.py
numba/tests/compile_with_pycc.py
numba/tests/test_deprecations.py
numba/tests/test_looplifting.py
numba/tests/test_storeslice.py
numba/tests/recursion_usecases.py
Expand Down Expand Up @@ -198,7 +197,6 @@ exclude =
numba/tests/test_complex.py
numba/tests/test_hashing.py
numba/tests/test_sys_stdin_assignment.py
numba/tests/test_ufuncs.py
numba/tests/pdlike_usecase.py
numba/tests/test_range.py
numba/tests/test_nrt_refct.py
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,25 @@ jobs:
pull-requests: write # for actions/stale to close stale PRs
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v7
with:
# issues
stale-issue-message: >
This issue is marked as stale as it has had no activity in the past
30 days. Please close this issue if no further response or action is
needed. Otherwise, please respond with any updates and confirm that
this issue still needs to be addressed.
stale-issue-label: 'stale'
any-of-labels: 'question,needtriage,more info needed'
any-of-issue-labels: 'question,needtriage,more info needed'
days-before-issue-stale: 30
days-before-issue-close: -1
days-before-issue-close: 7
# pull requests
stale-pr-message: >
This pull request is marked as stale as it has had no activity in
the past 3 months. Please respond to this comment if you're still
interested in working on this. Many thanks!
days-before-pr-stale: 90 # 3 months
days-before-pr-close: 7
any-of-pr-labels: '2 - In progress,4 - Waiting on author'
stale-pr-label: 'stale'
close-pr-label: 'abandoned - stale'
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://gitlab.com/pycqa/flake8
- repo: https://github.com/PyCQA/flake8
rev: 3.7.8
hooks:
- id: flake8
16 changes: 16 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ jobs:
PYTHON: '3.11'
NUMPY: '1.23'
CONDA_ENV: azure_ci
TEST_START_INDEX: 8
py38_np123_svml:
PYTHON: '3.8'
NUMPY: '1.23'
CONDA_ENV: azure_ci
TEST_SVML: yes
TEST_START_INDEX: 9
py38_np124:
PYTHON: '3.8'
NUMPY: '1.24'
CONDA_ENV: azure_ci
TEST_START_INDEX: 10
py311_np123_11:
PYTHON: '3.11'
Expand Down Expand Up @@ -126,6 +137,11 @@ jobs:
PYTHON: '3.11'
NUMPY: '1.23'
CONDA_ENV: azure_ci
TEST_START_INDEX: 15
py310_np124:
PYTHON: '3.10'
NUMPY: '1.24'
CONDA_ENV: azure_ci
TEST_START_INDEX: 16
py311_np123_17:
PYTHON: '3.11'
Expand Down
7 changes: 6 additions & 1 deletion buildscripts/azure/azure-linux-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:

steps:
- script: |
set -e
echo "Installing Miniconda"
buildscripts/incremental/install_miniconda.sh
export PATH=$HOME/miniconda3/bin:$PATH
Expand All @@ -21,25 +22,29 @@ jobs:
displayName: 'Before Install'
- script: |
set -e
export PATH=$HOME/miniconda3/bin:$PATH
buildscripts/incremental/build.sh
displayName: 'Build'
- script: |
set -e
export PATH=$HOME/miniconda3/bin:$PATH
conda install -y flake8
flake8 numba
flake8 -j auto numba
displayName: 'Flake8'
condition: eq(variables['RUN_FLAKE8'], 'yes')
- script: |
set -e
export PATH=$HOME/miniconda3/bin:$PATH
conda install -y mypy
mypy
displayName: 'Mypy'
condition: eq(variables['RUN_MYPY'], 'yes')
- script: |
set -e
export PATH=$HOME/miniconda3/bin:$PATH
buildscripts/incremental/test.sh
displayName: 'Test'
10 changes: 7 additions & 3 deletions buildscripts/azure/azure-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ jobs:
- script: |
call activate %CONDA_ENV%
set NUMBA_ENABLE_CUDASIM=1
python -m numba.runtests -l
displayName: 'List discovered tests'
- script: |
call activate %CONDA_ENV%
set NUMBA_CAPTURED_ERRORS=new_style
echo "Running slice of discovered tests: %TEST_START_INDEX%,None,%TEST_COUNT%"
set NUMBA_ENABLE_CUDASIM=1
echo "Running shard of discovered tests: %TEST_START_INDEX%,None,%TEST_COUNT%"
python -m numba.runtests -b -v -g -m 2 -- numba.tests
displayName: 'Test modified test files'
- script: |
call activate %CONDA_ENV%
set NUMBA_CAPTURED_ERRORS=new_style
python runtests.py -m 2 -b -j "%TEST_START_INDEX%,None,%TEST_COUNT%" --exclude-tags='long_running' -- numba.tests
displayName: 'Test slice of test files'
set NUMBA_ENABLE_CUDASIM=1
echo "Running shard of discovered tests: %TEST_START_INDEX%:%TEST_COUNT%"
python runtests.py -m 2 -b -j "%TEST_START_INDEX%:%TEST_COUNT%" --exclude-tags='long_running' -- numba.tests
displayName: 'Test shard of test files'
2 changes: 1 addition & 1 deletion buildscripts/condarecipe.local/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ requirements:
# available.
- tbb-devel >=2021,<2021.6 # [not (aarch64 or ppc64le)]
run:
- python >=3.7
- python >=3.8
# NumPy 1.22.0, 1.22.1, 1.22.2 are all broken for ufuncs, see #7756
- numpy >=1.18, !=1.22.0, !=1.22.1, !=1.22.2
- setuptools
Expand Down
1 change: 1 addition & 0 deletions buildscripts/gpuci/axis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ CUDA_TOOLKIT_VER:
- "11.1"
- "11.2"
- "11.5"
- "11.8"

LINUX_VER:
- ubuntu18.04
Expand Down
23 changes: 21 additions & 2 deletions buildscripts/gpuci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,29 @@ else
export NUMBA_CUDA_USE_NVIDIA_BINDING=0;
fi;

# Test with Minor Version Compatibility on CUDA 11.8
if [ $CUDA_TOOLKIT_VER == "11.8" ]
then
export NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY=1;
else
export NUMBA_CUDA_ENABLE_MINOR_VERSION_COMPATIBILITY=0;
fi;

# Test with different NumPy versions with each toolkit (it's not worth testing
# the Cartesian product of versions here, we just need to test with different
# CUDA and NumPy versions).
declare -A CTK_NUMPY_VMAP=( ["11.0"]="1.19" ["11.1"]="1.21" ["11.2"]="1.22" ["11.5"]="1.23")
declare -A CTK_NUMPY_VMAP=( ["11.0"]="1.21" ["11.1"]="1.22" ["11.2"]="1.23" ["11.5"]="1.24" ["11.8"]="1.24")
NUMPY_VER="${CTK_NUMPY_VMAP[$CUDA_TOOLKIT_VER]}"

# Use conda-forge for NumPy 1.24 - at the time of writing it is not available
# on the defaults channel.

if [ "${NUMPY}" == "1.24" ]; then
NUMPY_CHANNEL_PKG=conda-forge::numpy
else
NUMPY_CHANNEL_PKG=numpy
fi


################################################################################
# SETUP - Check environment
Expand All @@ -46,8 +63,10 @@ gpuci_logger "Create testing env"
gpuci_mamba_retry create -n numba_ci -y \
"python=${PYTHON_VER}" \
"cudatoolkit=${CUDA_TOOLKIT_VER}" \
"rapidsai::cubinlinker" \
"conda-forge::ptxcompiler" \
"numba/label/dev::llvmlite" \
"numpy=${NUMPY_VER}" \
"${NUMPY_CHANNEL_PKG}=${NUMPY_VER}" \
"scipy" \
"cffi" \
"psutil" \
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/incremental/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ else
echo Error
fi
chmod +x miniconda.sh
./miniconda.sh -b
bash ./miniconda.sh -b
6 changes: 5 additions & 1 deletion buildscripts/incremental/setup_conda_environment.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ cmd /C conda info
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@rem Use conda-forge for NumPy 1.24 - at the time of writing it is not available
@rem on the defaults channel.
if %NUMPY%==1.24 (set NUMPY_CHANNEL_PKG="conda-forge::numpy") else (set NUMPY_CHANNEL_PKG="numpy")

@echo on

@rem Deactivate any environment
call deactivate
@rem Display root environment (for debugging)
conda list
@rem Scipy, CFFI, jinja2 and IPython are optional dependencies, but exercised in the test suite
conda create -n %CONDA_ENV% -q -y -c conda-forge python=%PYTHON% numpy=%NUMPY% cffi pip scipy jinja2 ipython gitpython pyyaml
conda create -n %CONDA_ENV% -q -y -c conda-forge python=%PYTHON% %NUMPY_CHANNEL_PKG%=%NUMPY% cffi pip scipy jinja2 ipython gitpython pyyaml

call activate %CONDA_ENV%
@rem Install latest llvmlite build
Expand Down
13 changes: 10 additions & 3 deletions buildscripts/incremental/setup_conda_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,22 @@ source deactivate
# Display root environment (for debugging)
conda list

# Use conda-forge for NumPy 1.24 - at the time of writing it is not available
# on the defaults channel.

if [ "${NUMPY}" == "1.24" ]; then
NUMPY_CHANNEL_PKG=conda-forge::numpy
else
NUMPY_CHANNEL_PKG=numpy
fi

# If VANILLA_INSTALL is yes, then only Python, NumPy and pip are installed, this
# is to catch tests/code paths that require an optional package and are not
# guarding against the possibility that it does not exist in the environment.
# Create a base env first and then add to it...
# NOTE: gitpython is needed for CI testing to do the test slicing
# NOTE: pyyaml is used to ensure that the Azure CI config is valid
conda create -n $CONDA_ENV -q -y -c conda-forge ${EXTRA_CHANNELS} python=$PYTHON numpy=$NUMPY pip gitpython pyyaml
conda create -n $CONDA_ENV -q -y -c conda-forge ${EXTRA_CHANNELS} python=$PYTHON $NUMPY_CHANNEL_PKG=$NUMPY pip gitpython pyyaml

# Activate first
set +v
Expand Down Expand Up @@ -76,8 +85,6 @@ if [ $PYTHON \< "3.9" ]; then $CONDA_INSTALL importlib_metadata; fi
if [ "$TEST_SVML" == "yes" ]; then $CONDA_INSTALL -c numba icc_rt; fi
# Install Intel TBB parallel backend
if [ "$TEST_THREADING" == "tbb" ]; then $CONDA_INSTALL -c numba tbb=2021 "tbb-devel>=2021,<2021.6"; fi
# Install pickle5
if [ "$TEST_PICKLE5" == "yes" ]; then $PIP_INSTALL pickle5; fi
# Install typeguard
# if [ "$RUN_TYPEGUARD" == "yes" ]; then $CONDA_INSTALL conda-forge::typeguard; fi

Expand Down
2 changes: 1 addition & 1 deletion buildscripts/incremental/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ python -m numba.tests.test_runtests
echo "INFO: All discovered tests:"
python -m numba.runtests -l

# Now run the Numba test suite with slicing
# Now run the Numba test suite with sharding
# Note that coverage is run from the checkout dir to match the "source"
# directive in .coveragerc
echo "INFO: Running slice of discovered tests: ($TEST_START_INDEX,None,$TEST_COUNT)"
Expand Down
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: rtd
channels:
- numba/label/dev
dependencies:
- python=3.7
- python=3.8
- llvmlite=0.40
- numpy
- numpydoc
Expand Down

0 comments on commit 2c7926d

Please sign in to comment.