Skip to content

Commit 0e132de

Browse files
committed
Simplify pip install command to require just one of --group test-cu12 or --group test-cu13 to install all test dependencies for the given CTK major version.
1 parent ec8d79c commit 0e132de

5 files changed

Lines changed: 26 additions & 14 deletions

File tree

‎.github/workflows/test-wheel-linux.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ jobs:
284284
run: |
285285
set -euo pipefail
286286
pushd cuda_pathfinder
287-
pip install --only-binary=:all: -v . --group "cu${TEST_CUDA_MAJOR}-ext" --group host
287+
pip install --only-binary=:all: -v . --group "test-cu${TEST_CUDA_MAJOR}"
288288
pip list
289289
popd
290290

‎.github/workflows/test-wheel-windows.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
shell: bash --noprofile --norc -xeuo pipefail {0}
258258
run: |
259259
pushd cuda_pathfinder
260-
pip install --only-binary=:all: -v . --group "cu${TEST_CUDA_MAJOR}-ext" --group host
260+
pip install --only-binary=:all: -v . --group "test-cu${TEST_CUDA_MAJOR}"
261261
pip list
262262
popd
263263

‎cuda_pathfinder/pyproject.toml‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,46 @@ dynamic = ["version", "readme"]
1111
dependencies = []
1212

1313
[dependency-groups]
14-
test = ["pytest>=6.2.4"]
15-
cu12 = [
14+
# Internal organization of test dependencies
15+
_test-deps = ["pytest>=6.2.4"]
16+
_test-cu12-base = [
1617
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg,cccl]==12.*",
1718
"nvidia-cudss-cu12",
1819
"nvidia-libmathdx-cu12",
1920
]
20-
cu12-ext = [
21-
{ include-group = "cu12" },
21+
_test-cu12-ext = [
2222
"cuda-toolkit[cufile]==12.*; sys_platform != 'win32'",
2323
"nvidia-cufftmp-cu12; sys_platform != 'win32'",
2424
"nvidia-nccl-cu12; sys_platform != 'win32'",
2525
"nvidia-nvshmem-cu12; sys_platform != 'win32'",
2626
"nvidia-cublasmp-cu12; sys_platform != 'win32'",
2727
]
28-
cu13 = [
28+
_test-cu13-base = [
2929
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg,cccl,nvvm]==13.*",
3030
"nvidia-cudss-cu13",
3131
]
32-
cu13-ext = [
33-
{ include-group = "cu13" },
32+
_test-cu13-ext = [
3433
"cuda-toolkit[cufile]==13.*; sys_platform != 'win32'",
3534
"nvidia-cublasmp-cu13; sys_platform != 'win32'",
3635
"nvidia-nccl-cu13; sys_platform != 'win32'",
3736
"nvidia-nvshmem-cu13; sys_platform != 'win32'",
3837
]
39-
host = [
38+
_test-host = [
4039
"nvpl-fft; platform_system == 'Linux' and platform_machine == 'aarch64'",
4140
]
41+
# User-facing dependencies, e.g. --group test-cu13
42+
test-cu12 = [
43+
{ include-group = "_test-deps" },
44+
{ include-group = "_test-cu12-base" },
45+
{ include-group = "_test-cu12-ext" },
46+
{ include-group = "_test-host" },
47+
]
48+
test-cu13 = [
49+
{ include-group = "_test-deps" },
50+
{ include-group = "_test-cu13-base" },
51+
{ include-group = "_test-cu13-ext" },
52+
{ include-group = "_test-host" },
53+
]
4254

4355
[project.urls]
4456
Repository = "https://github.com/NVIDIA/cuda-python"

‎toolshed/collect_site_packages_dll_files.ps1‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ function Fresh-Venv {
2323
Set-Location -Path 'cuda_pathfinder'
2424

2525
Fresh-Venv -Path '..\TmpCp12Venv'
26-
pip install --only-binary=:all: -e . --group test --group cu12-ext --group host
26+
pip install --only-binary=:all: -e . --group test-cu12
2727
deactivate
2828

2929
Fresh-Venv -Path '..\TmpCp13Venv'
30-
pip install --only-binary=:all: -e . --group test --group cu13-ext --group host
30+
pip install --only-binary=:all: -e . --group test-cu13
3131
deactivate
3232

3333
Set-Location -Path '..'

‎toolshed/collect_site_packages_so_files.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ fresh_venv() {
1717
cd cuda_pathfinder/
1818
fresh_venv ../TmpCp12Venv
1919
set -x
20-
pip install --only-binary=:all: -e . --group test --group cu12-ext --group host
20+
pip install --only-binary=:all: -e . --group test-cu12
2121
set +x
2222
deactivate
2323
fresh_venv ../TmpCp13Venv
2424
set -x
25-
pip install --only-binary=:all: -e . --group test --group cu13-ext --group host
25+
pip install --only-binary=:all: -e . --group test-cu13
2626
set +x
2727
deactivate
2828
cd ..

0 commit comments

Comments
 (0)