Skip to content

Commit d1f1dc3

Browse files
authored
Merge branch 'main' into debug-dynamic
2 parents 8a58c48 + c9f83a7 commit d1f1dc3

File tree

147 files changed

+11165
-2771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+11165
-2771
lines changed

.github/workflows/checks.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: BSD-2-Clause
3+
4+
on:
5+
workflow_call:
6+
7+
defaults:
8+
run:
9+
shell: bash
10+
11+
jobs:
12+
check-style:
13+
runs-on: ubuntu-latest
14+
container:
15+
image: rapidsai/ci-conda:latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- uses: actions/cache@v4
22+
with:
23+
path: ~/.cache/pre-commit
24+
key: pre-commit-0|${{ hashFiles('.pre-commit-config.yaml') }}
25+
- name: Run ci/check_style.sh
26+
run: ci/check_style.sh

.github/workflows/conda-python-tests.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
7575
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
7676
tests:
77-
name: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}, ${{ matrix.GPU }}, ${{ matrix.DRIVER }}-driver, ${{ matrix.DEPENDENCIES }}-deps
77+
name: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}, ${{ matrix.GPU }}, ${{ matrix.DRIVER }}-driver, numba@${{ matrix.NUMBA_VERSION }}
7878
needs: compute-matrix
7979
strategy:
8080
fail-fast: false
@@ -83,7 +83,7 @@ jobs:
8383
env:
8484
RAPIDS_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
8585
RAPIDS_COVERAGE_DIR: ${{ github.workspace }}/coverage-results
86-
RAPIDS_DEPENDENCIES: ${{ matrix.DEPENDENCIES }}
86+
NUMBA_VERSION: ${{ matrix.NUMBA_VERSION }}
8787
RAPIDS_TESTS_DIR: ${{ github.workspace }}/test-results
8888
container:
8989
image: rapidsai/ci-conda:cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}
@@ -113,6 +113,20 @@ jobs:
113113
- name: Setup proxy cache
114114
uses: nv-gha-runners/setup-proxy-cache@main
115115
continue-on-error: true
116+
- name: Compute pixi environment name
117+
run: |
118+
set -euo pipefail
119+
CUDA_VER_PART="$(cut -d. -f1-2 <<< "${{ matrix.CUDA_VER }}" | tr . -)"
120+
PY_VER_PART="py$(tr -d . <<< "${{ matrix.PY_VER }}")"
121+
PIXI_ENV="cu-${CUDA_VER_PART}-${PY_VER_PART}"
122+
{
123+
echo "PY_VER_PART=${PY_VER_PART}"
124+
echo "PIXI_ENV=${PIXI_ENV}"
125+
} >> "${GITHUB_ENV}"
126+
- name: Setup pixi
127+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293
128+
with:
129+
environments: ${{ env.PIXI_ENV }}
116130
- name: Python tests
117131
run: ${{ inputs.script }}
118132
env:

.github/workflows/pr.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- "pull-request/[0-9]+"
10+
- "main"
1011

1112
concurrency:
1213
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
@@ -31,10 +32,7 @@ jobs:
3132
secrets: inherit
3233
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
3334
checks:
34-
secrets: inherit
35-
uses: rapidsai/shared-workflows/.github/workflows/[email protected]
36-
with:
37-
enable_check_generated_files: false
35+
uses: ./.github/workflows/checks.yaml
3836
compute-matrix:
3937
runs-on: ubuntu-latest
4038
outputs:

.github/workflows/simulator-test.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,17 @@ jobs:
101101
echo "RAPIDS_NIGHTLY_DATE=${{ inputs.date }}" >> "${GITHUB_ENV}"
102102
- name: Setup proxy cache
103103
uses: nv-gha-runners/setup-proxy-cache@main
104+
- name: Compute pixi environment name
105+
run: |
106+
set -euo pipefail
107+
CUDA_VER_PART="$(cut -d. -f1-2 <<< "${{ matrix.CUDA_VER }}" | tr . -)"
108+
PY_VER_PART="py$(tr -d . <<< "${{ matrix.PY_VER }}")"
109+
PIXI_ENV="cu-${CUDA_VER_PART}-${PY_VER_PART}"
110+
echo "PIXI_ENV=${PIXI_ENV}" >> "${GITHUB_ENV}"
111+
- name: Setup pixi
112+
uses: prefix-dev/setup-pixi@fef5c9568ca6c4ff7707bf840ab0692ba3f08293
113+
with:
114+
environments: ${{ env.PIXI_ENV }}
104115
- name: Python tests
105116
run: ${{ inputs.script }}
106117
env:

.github/workflows/wheels-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ jobs:
8989
9090
echo "MATRIX=${MATRIX}" | tee --append "${GITHUB_OUTPUT}"
9191
test:
92-
name: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}, ${{ matrix.GPU }}, ${{ matrix.DRIVER }}-driver, ${{ matrix.DEPENDENCIES }}-deps
92+
name: ${{ matrix.CUDA_VER }}, ${{ matrix.PY_VER }}, ${{ matrix.ARCH }}, ${{ matrix.LINUX_VER }}, ${{ matrix.GPU }}, ${{ matrix.DRIVER }}-driver, numba@${{ matrix.NUMBA_VERSION }}
9393
needs: compute-matrix
9494
env:
9595
RAPIDS_ARTIFACTS_DIR: ${{ github.workspace }}/artifacts
96-
RAPIDS_DEPENDENCIES: ${{ matrix.DEPENDENCIES }}
96+
NUMBA_VERSION: ${{ matrix.NUMBA_VERSION }}
9797
RAPIDS_TESTS_DIR: ${{ github.workspace }}/test-results
9898
strategy:
9999
fail-fast: false

ci/matrix.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: BSD-2-Clause
33
# Please keep the matrices sorted in ascending order by the following:
44
#
5-
# [ARCH, PY_VER, CUDA_VER, LINUX_VER, GPU, DRIVER, DEPENDENCIES]
5+
# [ARCH, PY_VER, CUDA_VER, LINUX_VER, GPU, DRIVER, NUMBA_VERSION]
66
#
77
build-matrix:
88
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.8.0', LINUX_VER: 'rockylinux8' }
@@ -18,17 +18,17 @@ simulator-matrix:
1818
# We test "oldest" dependencies with the oldest supported Python version and
1919
# the second-newest Python version.
2020
test-matrix:
21-
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'rockylinux8', GPU: 'l4', DRIVER: 'earliest', DEPENDENCIES: 'oldest' }
22-
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'rockylinux8', GPU: 'l4', DRIVER: 'earliest', DEPENDENCIES: 'latest' }
23-
- { CUDA_VER: '12.2.2', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', DEPENDENCIES: 'latest' }
24-
- { CUDA_VER: '12.9.1', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'ubuntu24.04', GPU: 'l4', DRIVER: 'latest', DEPENDENCIES: 'latest' }
25-
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', DEPENDENCIES: 'oldest' }
26-
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.13', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', DEPENDENCIES: 'latest' }
27-
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.13', LINUX_VER: 'ubuntu24.04', GPU: 'l4', DRIVER: 'latest', DEPENDENCIES: 'latest' }
28-
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8', GPU: 'a100', DRIVER: 'earliest', DEPENDENCIES: 'oldest' }
29-
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'rockylinux8', GPU: 'a100', DRIVER: 'earliest', DEPENDENCIES: 'latest' }
30-
- { CUDA_VER: '12.2.2', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
31-
- { CUDA_VER: '12.9.1', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'ubuntu24.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
32-
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'oldest' }
33-
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.13', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
34-
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.13', LINUX_VER: 'ubuntu24.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
21+
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.10', LINUX_VER: 'rockylinux8', GPU: 'l4', DRIVER: 'earliest', NUMBA_VERSION: '0.60' }
22+
- { CUDA_VER: '12.0.1', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'rockylinux8', GPU: 'l4', DRIVER: 'earliest', NUMBA_VERSION: '*' }
23+
- { CUDA_VER: '12.2.2', ARCH: 'amd64', PY_VER: '3.11', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', NUMBA_VERSION: '*' }
24+
- { CUDA_VER: '12.9.1', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'ubuntu24.04', GPU: 'l4', DRIVER: 'latest', NUMBA_VERSION: '*' }
25+
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.12', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', NUMBA_VERSION: '0.60' }
26+
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.13', LINUX_VER: 'ubuntu22.04', GPU: 'l4', DRIVER: 'latest', NUMBA_VERSION: '*' }
27+
- { CUDA_VER: '13.0.0', ARCH: 'amd64', PY_VER: '3.13', LINUX_VER: 'ubuntu24.04', GPU: 'l4', DRIVER: 'latest', NUMBA_VERSION: '*' }
28+
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.10', LINUX_VER: 'rockylinux8', GPU: 'a100', DRIVER: 'earliest', NUMBA_VERSION: '0.60' }
29+
- { CUDA_VER: '12.0.1', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'rockylinux8', GPU: 'a100', DRIVER: 'earliest', NUMBA_VERSION: '*' }
30+
- { CUDA_VER: '12.2.2', ARCH: 'arm64', PY_VER: '3.11', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', NUMBA_VERSION: '*' }
31+
- { CUDA_VER: '12.9.1', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'ubuntu24.04', GPU: 'a100', DRIVER: 'latest', NUMBA_VERSION: '*' }
32+
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.12', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', NUMBA_VERSION: '0.60' }
33+
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.13', LINUX_VER: 'ubuntu22.04', GPU: 'a100', DRIVER: 'latest', NUMBA_VERSION: '*' }
34+
- { CUDA_VER: '13.0.0', ARCH: 'arm64', PY_VER: '3.13', LINUX_VER: 'ubuntu24.04', GPU: 'a100', DRIVER: 'latest', NUMBA_VERSION: '*' }

ci/test_conda.sh

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@
44

55
set -euo pipefail
66

7-
. /opt/conda/etc/profile.d/conda.sh
8-
9-
CTK_PACKAGE_DEPENDENCIES=(
10-
"cuda-cccl"
11-
"cuda-nvcc-impl"
12-
"cuda-nvrtc"
13-
"libcurand-dev"
14-
"cuda-cuobjdump"
15-
)
16-
177
DISTRO=`cat /etc/os-release | grep "^ID=" | awk 'BEGIN {FS="="} { print $2 }'`
188

199
if [ "$DISTRO" = "ubuntu" ]; then
@@ -22,67 +12,30 @@ if [ "$DISTRO" = "ubuntu" ]; then
2212
apt remove --purge `dpkg --get-selections | grep cuda-nvrtc | awk '{print $1}'` -y
2313
fi
2414

25-
rapids-logger "Install testing dependencies"
26-
# TODO: Replace with rapids-dependency-file-generator
27-
DEPENDENCIES=(
28-
"c-compiler"
29-
"cxx-compiler"
30-
"${CTK_PACKAGE_DEPENDENCIES[@]}"
31-
"cuda-python"
32-
"cuda-version=${CUDA_VER%.*}"
33-
"make"
34-
"numba-cuda"
35-
"psutil"
36-
"pytest"
37-
"pytest-xdist"
38-
"pytest-benchmark"
39-
"cffi"
40-
"ml_dtypes"
41-
"python=${RAPIDS_PY_VERSION}"
42-
)
4315
# Constrain oldest supported dependencies for testing
44-
if [ "${RAPIDS_DEPENDENCIES:-}" = "oldest" ]; then
45-
DEPENDENCIES+=("numba==0.60.0")
16+
if [ "${NUMBA_VERSION:-*}" != "*" ]; then
17+
# add to the default environment's dependencies
18+
pixi add --feature "${PY_VER_PART}" "numba=${NUMBA_VERSION}"
4619
fi
4720

48-
rapids-mamba-retry create \
49-
-n test \
50-
--strict-channel-priority \
51-
--channel "`pwd`/conda-repo" \
52-
--channel conda-forge \
53-
"${DEPENDENCIES[@]}"
54-
55-
# Temporarily allow unbound variables for conda activation.
56-
set +u
57-
conda activate test
58-
set -u
59-
60-
pip install filecheck
61-
62-
rapids-print-env
63-
6421
rapids-logger "Check GPU usage"
6522
nvidia-smi
6623

67-
rapids-logger "Build test binaries"
68-
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
69-
pushd $NUMBA_CUDA_TEST_BIN_DIR
70-
make -j $(nproc)
71-
72-
rapids-logger "Show Numba system info"
73-
python -m numba --sysinfo
74-
7524
EXITCODE=0
7625
trap "EXITCODE=1" ERR
7726
set +e
7827

28+
rapids-logger "Show Numba system info"
29+
pixi run -e "${PIXI_ENV}" python -m numba --sysinfo
30+
7931
rapids-logger "Test importing numba.cuda"
80-
python -c "from numba import cuda"
32+
pixi run -e "${PIXI_ENV}" python -c "from numba import cuda"
8133

8234
rapids-logger "Run Tests"
83-
pytest -v
84-
85-
popd
35+
pixi run -e "${PIXI_ENV}" test -n auto \
36+
--dist loadscope \
37+
--loadscope-reorder \
38+
-v
8639

8740
rapids-logger "Test script exiting with value: $EXITCODE"
8841
exit ${EXITCODE}

ci/test_simulator.sh

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,21 @@
44

55
set -euo pipefail
66

7-
. /opt/conda/etc/profile.d/conda.sh
8-
9-
rapids-logger "Install testing dependencies"
10-
# TODO: Replace with rapids-dependency-file-generator
11-
DEPENDENCIES=(
12-
"psutil"
13-
"pytest"
14-
"pytest-xdist"
15-
"pytest-benchmark"
16-
"cffi"
17-
"ml_dtypes"
18-
"python=${RAPIDS_PY_VERSION}"
19-
"numba-cuda"
20-
)
21-
rapids-mamba-retry create \
22-
-n test \
23-
--strict-channel-priority \
24-
--channel "`pwd`/conda-repo" \
25-
--channel conda-forge \
26-
"${DEPENDENCIES[@]}"
27-
28-
# Temporarily allow unbound variables for conda activation.
29-
set +u
30-
conda activate test
31-
set -u
32-
33-
pip install filecheck
34-
35-
rapids-print-env
36-
37-
# The simulator doesn't actually use the test binaries, but we move into the
38-
# test binaries folder so that we're not in the root of the repo, and therefore
39-
# numba-cuda code from the installed package will be tested, instead of the
40-
# code in the source repo.
41-
rapids-logger "Move to test binaries folder"
42-
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
43-
pushd $NUMBA_CUDA_TEST_BIN_DIR
44-
45-
rapids-logger "Show Numba system info"
46-
python -m numba --sysinfo
47-
487
EXITCODE=0
498
trap "EXITCODE=1" ERR
509
set +e
5110

52-
rapids-logger "Run Tests"
53-
export NUMBA_ENABLE_CUDASIM=1
54-
pytest -v
11+
rapids-logger "Show Numba system info"
12+
pixi run -e "${PIXI_ENV}" python -m numba --sysinfo
13+
14+
rapids-logger "Test importing numba.cuda"
15+
pixi run -e "${PIXI_ENV}" python -c "from numba import cuda"
5516

56-
popd
17+
rapids-logger "Run Tests"
18+
pixi run -e "${PIXI_ENV}" simtest -n auto \
19+
--dist loadscope \
20+
--loadscope-reorder \
21+
-v
5722

5823
rapids-logger "Test script exiting with value: $EXITCODE"
5924
exit ${EXITCODE}

ci/test_wheel.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ DEPENDENCIES=(
1919
)
2020

2121
# Constrain oldest supported dependencies for testing
22-
if [ "${RAPIDS_DEPENDENCIES:-}" = "oldest" ]; then
23-
DEPENDENCIES+=("numba==0.60.0")
22+
if [ "${NUMBA_VERSION:-*}" != "*" ]; then
23+
DEPENDENCIES+=("numba==${NUMBA_VERSION}")
2424
fi
2525

2626
python -m pip install "${DEPENDENCIES[@]}"

docs/source/user/cudapysupported.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ The following functions from the :mod:`math` module are supported:
225225
* :func:`math.log2`
226226
* :func:`math.log10`
227227
* :func:`math.log1p`
228+
* :func:`math.nextafter` (Excluding the ``steps`` keyword argument)
228229
* :func:`math.sqrt`
229230
* :func:`math.remainder`
230231
* :func:`math.pow`

0 commit comments

Comments
 (0)