Skip to content

Commit c97df11

Browse files
authored
Merge branch 'main' into vk/config-redirect
2 parents 5dc680b + 2df2c59 commit c97df11

33 files changed

+1084
-1196
lines changed

.github/workflows/pr.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ jobs:
1919
- compute-matrix
2020
- build-conda
2121
- test-conda
22-
- test-conda-ctypes-binding
2322
- test-simulator
2423
- build-wheels
2524
- build-wheels-windows
2625
- test-wheels-windows
2726
- test-wheels
28-
- test-wheels-ctypes-binding
2927
- test-wheels-deps-wheels
3028
- test-thirdparty
3129
- build-docs
@@ -80,18 +78,6 @@ jobs:
8078
script: "ci/test_conda.sh"
8179
run_codecov: false
8280
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
83-
test-conda-ctypes-binding:
84-
needs:
85-
- build-conda
86-
- compute-matrix
87-
uses: ./.github/workflows/conda-python-tests.yaml
88-
with:
89-
build_type: pull-request
90-
script: "ci/test_conda_ctypes_binding.sh"
91-
run_codecov: false
92-
# This selects "ARCH=amd64 and CUDA >=12, with the latest supported Python for each CUDA major version".
93-
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
94-
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber >= 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
9581
test-simulator:
9682
needs:
9783
- build-conda
@@ -124,17 +110,6 @@ jobs:
124110
build_type: pull-request
125111
script: "ci/test_wheel.sh false"
126112
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
127-
test-wheels-ctypes-binding:
128-
needs:
129-
- build-wheels
130-
- compute-matrix
131-
uses: ./.github/workflows/wheels-test.yaml
132-
with:
133-
build_type: pull-request
134-
script: "ci/test_wheel_ctypes_binding.sh"
135-
# This selects "ARCH=amd64 and CUDA >=12, with the latest supported Python for each CUDA major version".
136-
matrix: ${{ needs.compute-matrix.outputs.TEST_MATRIX }}
137-
matrix_filter: map(select(.ARCH == "amd64" and (.CUDA_VER | split(".") | .[0] | tonumber >= 12))) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
138113
test-wheels-deps-wheels:
139114
needs:
140115
- build-wheels

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,19 @@ they are compiled for the appropriate compute capability.
3737
```
3838
cd testing
3939
# Optionally, build test binaries and point to their location for the test suite
40-
make
40+
make -j $(nproc)
4141
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`
4242
# Execute tests
4343
pytest -n auto -v
4444
```
4545

46+
Alternatively, you can use [pixi](https://pixi.sh/latest/installation/) to wrap all of that up for you:
47+
48+
```
49+
# run tests against CUDA 13
50+
pixi run -e cu13 test -n auto -v
51+
```
52+
4653

4754
Testing should discover the `numba.cuda` module from the `numba_cuda` package. You
4855
can check where `numba.cuda` files are being located by running

ci/coverage_report.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ python -m pip install \
2020
rapids-logger "Build test binaries"
2121
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
2222
pushd $NUMBA_CUDA_TEST_BIN_DIR
23-
make
23+
make -j $(nproc)
2424

2525
rapids-logger "Check GPU usage"
2626
nvidia-smi

ci/test_conda.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ nvidia-smi
6666
rapids-logger "Build test binaries"
6767
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
6868
pushd $NUMBA_CUDA_TEST_BIN_DIR
69-
make
69+
make -j $(nproc)
7070

7171
rapids-logger "Show Numba system info"
7272
python -m numba --sysinfo

ci/test_conda_ctypes_binding.sh

Lines changed: 0 additions & 70 deletions
This file was deleted.

ci/test_wheel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ python -m pip install "${DEPENDENCIES[@]}"
2828
rapids-logger "Build tests"
2929
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
3030
pushd $NUMBA_CUDA_TEST_BIN_DIR
31-
make
31+
make -j $(nproc)
3232

3333
rapids-logger "Test importing numba.cuda"
3434
python -c "from numba import cuda"

ci/test_wheel_ctypes_binding.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

ci/test_wheel_deps_wheels.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rapids-logger "Build test binaries"
1717

1818
export NUMBA_CUDA_TEST_BIN_DIR=`pwd`/testing
1919
pushd $NUMBA_CUDA_TEST_BIN_DIR
20-
make
20+
make -j $(nproc)
2121

2222
rapids-logger "Check GPU usage"
2323
nvidia-smi

docs/source/reference/envvars.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,11 @@ target.
103103
Enable warnings if a kernel is launched with host memory which forces a copy to and
104104
from the device. This option is on by default (default value is 1).
105105

106-
.. envvar:: NUMBA_CUDA_USE_NVIDIA_BINDING
106+
.. note::
107107

108-
When set to 1, Numba will attempt to use the `NVIDIA CUDA Python binding
109-
<https://nvidia.github.io/cuda-python/>`_ to make calls to the driver API
110-
instead of using its own ctypes binding. This defaults to 1 (on). Set to
111-
0 to use the ctypes bindings.
108+
Numba-CUDA always uses the NVIDIA CUDA Python bindings. The legacy ctypes
109+
bindings and the ``NUMBA_CUDA_USE_NVIDIA_BINDING`` environment variable have
110+
been removed.
112111

113112
.. envvar:: NUMBA_CUDA_INCLUDE_PATH
114113

docs/source/user/bindings.rst

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,22 @@
55
CUDA Bindings
66
=============
77

8-
Numba supports two bindings to the CUDA Driver APIs: its own internal bindings
9-
based on ctypes, and the official `NVIDIA CUDA Python bindings
10-
<https://nvidia.github.io/cuda-python/>`_. Functionality is equivalent between
11-
the two bindings.
12-
13-
The internal bindings are used by default. If the NVIDIA bindings are installed,
14-
then they can be used by setting the environment variable
15-
``NUMBA_CUDA_USE_NVIDIA_BINDING`` to ``1`` prior to the import of Numba. Once
16-
Numba has been imported, the selected binding cannot be changed.
8+
Numba-CUDA uses the official `NVIDIA CUDA Python bindings
9+
<https://nvidia.github.io/cuda-python/>`_ for all CUDA Driver interactions.
10+
Numba-CUDA previously provided its own internal ctypes-based bindings; the
11+
public APIs exposing those bindings are kept for compatibility, but if you
12+
need to interact directly with the CUDA Driver or other CUDA libraries we
13+
recommend using the `cuda-python <https://nvidia.github.io/cuda-python/>`_
14+
package directly.
1715

1816

1917
Per-Thread Default Streams
2018
--------------------------
2119

2220
Responsibility for handling Per-Thread Default Streams (PTDS) is delegated to
23-
the NVIDIA bindings when they are in use. To use PTDS with the NVIDIA bindings,
24-
set the environment variable ``CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM`` to
25-
``1`` instead of Numba's environmnent variable
26-
:envvar:`NUMBA_CUDA_PER_THREAD_DEFAULT_STREAM`.
21+
the NVIDIA bindings. To use PTDS, set the environment variable
22+
``CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM`` to ``1`` instead of Numba's
23+
environment variable :envvar:`NUMBA_CUDA_PER_THREAD_DEFAULT_STREAM`.
2724

2825
.. seealso::
2926

@@ -35,13 +32,5 @@ set the environment variable ``CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM`` to
3532
Roadmap
3633
-------
3734

38-
In Numba 0.56, the NVIDIA Bindings will be used by default, if they are
39-
installed.
40-
41-
In future versions of Numba:
42-
43-
- The internal bindings will be deprecated.
44-
- The internal bindings will be removed.
45-
46-
At present, no specific release is planned for the deprecation or removal of
47-
the internal bindings.
35+
The ctypes-based internal bindings have been removed in favor of the NVIDIA
36+
bindings. Future work focuses on expanding usage of ``cuda.core`` APIs.

0 commit comments

Comments
 (0)