Skip to content

Commit 96ee1c2

Browse files
committed
ci: add optional dependency group to avoid installation of cupy when testing the FT builds
1 parent 1cffc26 commit 96ee1c2

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

ci/tools/run-tests

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,18 @@ elif [[ "${test_module}" == "core" ]]; then
7777
echo "Installing core wheel"
7878
pwd
7979
ls
80+
81+
FREE_THREADING=""
82+
if python -c 'import sys; assert not sys._is_gil_enabled()' 2> /dev/null; then
83+
FREE_THREADING+="-ft"
84+
fi
85+
8086
if [[ "${LOCAL_CTK}" == 1 ]]; then
8187
# We already installed cuda-bindings, and all CTK components exist locally,
8288
# so just install the test dependencies.
83-
pip install $(ls *.whl)["test-cu${TEST_CUDA_MAJOR}"]
89+
pip install $(ls *.whl)["test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"]
8490
else
85-
pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}"]
91+
pip install $(ls *.whl)["cu${TEST_CUDA_MAJOR}","test-cu${TEST_CUDA_MAJOR}${FREE_THREADING}"]
8692
fi
8793
popd
8894
pushd ./cuda_core

cuda_core/pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,16 @@ dependencies = [
4949
cu11 = ["cuda-bindings[all]==11.8.*"]
5050
cu12 = ["cuda-bindings[all]==12.*"]
5151
cu13 = ["cuda-bindings[all]==13.*"]
52+
# TODO: these should all be in development dependencies; optional dependencies
53+
# are for features exposed to *users*, not a dumping ground for all tooling
54+
# needed to build and test the project
5255
test = ["cython>=3.1", "setuptools", "pytest>=6.2.4"]
5356
test-cu11 = ["cuda-core[test]", "cupy-cuda11x", "cuda-toolkit[cudart]==11.*"] # runtime headers needed by CuPy
5457
test-cu12 = ["cuda-core[test]", "cupy-cuda12x", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
5558
test-cu13 = ["cuda-core[test]", "cupy-cuda13x", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
59+
# free threaded build, cupy doesn't support free-threaded builds yet, so avoid installing it for now
60+
# TODO: cupy should support free threaded builds
61+
test-cu13-ft = ["cuda-core[test]", "cuda-toolkit[cudart]==13.*"]
5662

5763
[project.urls]
5864
homepage = "https://nvidia.github.io/cuda-python/"

0 commit comments

Comments
 (0)