Skip to content

Commit 459bbcb

Browse files
Copilotleofangrwgk
authored
Switch to cuda-toolkit metapackage for wheel dependencies with streamlined documentation (#883)
* Initial plan * Switch to cuda-toolkit metapackage for wheel dependencies Co-authored-by: leofang <[email protected]> * Merge cuda-toolkit extras into single lines - cuda_bindings: merge nvcc,nvrtc,nvjitlink,nvvm into single line - cuda_pathfinder: merge all extras except cufile (platform conditional) for cu12/cu13 Co-authored-by: leofang <[email protected]> * Add test-cu13 dependency now that cupy-cuda13x is available Co-authored-by: leofang <[email protected]> * Add release notes and update installation guides for cuda-toolkit dependency change - Add release notes for all modules (cuda-bindings 13.0.2, cuda-core 0.3.3, cuda-python 13.0.2) - Update installation guides to explain cuda-toolkit metapackage benefits - Clarify improved dependency resolution and version constraints - Document backward compatibility (user-facing commands unchanged) Co-authored-by: leofang <[email protected]> * Address reviewer feedback: move release notes to X.Y format and remove conda references Co-authored-by: leofang <[email protected]> * Address reviewer feedback: simplify documentation and remove overselling language Co-authored-by: leofang <[email protected]> * Remove NVCC from dependencies and fix conda documentation - Remove nvcc from cuda-toolkit dependencies as it was only needed for libNVVM access - NVVM now has its own wheel in CUDA 13, so NVCC compiler is no longer needed - Update documentation to remove nvcc from optional dependencies list - Fix typo in conda documentation and add example usage - Add release notes explaining NVCC removal as breaking change - Users who need NVCC should explicitly install nvidia-cuda-nvcc-cu13 Co-authored-by: leofang <[email protected]> * Fix CUDA 13 wheel names, clean up release notes, and restore nvcc in pathfinder Co-authored-by: leofang <[email protected]> * Apply suggestions from code review * Fix conda version pinning, markdown backticks, and improve release notes grammar Co-authored-by: leofang <[email protected]> * Add two missing "the" --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: leofang <[email protected]> Co-authored-by: Leo Fang <[email protected]> Co-authored-by: Ralf W. Grosse-Kunstleve <[email protected]>
1 parent db8daa6 commit 459bbcb

File tree

7 files changed

+32
-44
lines changed

7 files changed

+32
-44
lines changed

cuda_bindings/docs/source/install.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Optionally, NVRTC, nvJitLink, NVVM, and cuFile from CUDA Toolkit 13.x
1111

1212
```{note}
13-
The optional CUDA Toolkit components can be installed via PyPI, Conda, OS-specific package managers, or local installers (as described in the CUDA Toolkit [Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) and [Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) Installation Guides).
13+
The optional CUDA Toolkit components are now installed via the `cuda-toolkit` metapackage from PyPI for improved dependency resolution. Components can also be installed via Conda, OS-specific package managers, or local installers (as described in the CUDA Toolkit [Windows](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html) and [Linux](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) Installation Guides).
1414
```
1515

1616
Starting from v12.8.0, `cuda-python` becomes a meta package which currently depends only on `cuda-bindings`; in the future more sub-packages will be added to `cuda-python`. In the instructions below, we still use `cuda-python` as example to serve existing users, but everything is applicable to `cuda-bindings` as well.
@@ -27,12 +27,14 @@ Install all optional dependencies with:
2727
pip install -U cuda-python[all]
2828
```
2929

30-
Where the optional dependencies are:
30+
Where the optional dependencies include:
3131

32-
* nvidia-cuda-nvrtc (Provides NVRTC shared library)
33-
* nvidia-nvjitlink (Provides nvJitLink shared library)
34-
* nvidia-cuda-nvcc (Provides NVVM shared library)
35-
* nvidia-cufile (Provides cuFile shared library)
32+
* `nvidia-cuda-nvrtc` (NVRTC runtime compilation library)
33+
* `nvidia-nvjitlink` (nvJitLink library)
34+
* `nvidia-nvvm` (NVVM library)
35+
* `nvidia-cufile` (cuFile library, Linux only)
36+
37+
These are now installed through the `cuda-toolkit` metapackage for improved dependency resolution.
3638

3739

3840
## Installing from Conda
@@ -41,6 +43,15 @@ Where the optional dependencies are:
4143
$ conda install -c conda-forge cuda-python
4244
```
4345

46+
```{note}
47+
When using conda, the `cuda-version` metapackage can be used to control the versions of CUDA Toolkit components that are installed to the conda environment.
48+
```
49+
50+
For example:
51+
```console
52+
$ conda install -c conda-forge cuda-python cuda-version=13
53+
```
54+
4455

4556
## Installing from Source
4657

cuda_bindings/docs/source/release/13.X.Y-notes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ Released on TBD
1212
Highlights
1313
----------
1414

15+
* Migrated wheel dependencies from individual NVIDIA packages to the ``cuda-toolkit`` metapackage for improved dependency resolution and version constraints.
1516
* Automatic CUDA library path detection based on ``CUDA_HOME``, eliminating the need to manually set ``LIBRARY_PATH`` environment variables for installation.
17+
* The ``[all]`` optional dependencies now use ``cuda-toolkit`` with appropriate extras instead of individual packages. The NVCC compiler is no longer automatically installed with ``pip install cuda-python[all]`` as it was previously included only to access the NVVM library, which now has its own dedicated wheel. Users who need the NVCC compiler should explicitly install it with ``pip install cuda-toolkit[nvcc]==X.Y`` with the appropriate version for their needs.
1618

1719

1820
Known issues
1921
------------
2022

21-
* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``.
23+
* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``.

cuda_bindings/pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ dependencies = [
3333

3434
[project.optional-dependencies]
3535
all = [
36-
"nvidia-cuda-nvcc~=13.0",
37-
"nvidia-cuda-nvrtc~=13.0",
38-
"nvidia-nvjitlink~=13.0",
39-
"nvidia-nvvm~=13.0",
40-
"nvidia-cufile; sys_platform == 'linux'",
36+
"cuda-toolkit[nvrtc,nvjitlink,nvvm]==13.*",
37+
"cuda-toolkit[cufile]==13.*; sys_platform == 'linux'",
4138
]
4239

4340
test = [

cuda_core/docs/source/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ dependencies are as follows:
1717

1818
## Installing from PyPI
1919

20-
`cuda.core` works with `cuda.bindings` (part of `cuda-python`) 11 or 12. For example with CUDA 12:
20+
`cuda.core` works with `cuda.bindings` (part of `cuda-python`) 11 or 12. Test dependencies now use the ``cuda-toolkit`` metapackage for improved dependency resolution. For example with CUDA 12:
2121
```console
2222
$ pip install cuda-core[cu12]
2323
```
24-
and likewise use `[cu11]` for CUDA 11.
24+
and likewise use `[cu11]` for CUDA 11, or `[cu13]` for CUDA 13.
2525

2626
Note that using `cuda.core` with NVRTC installed from PyPI via `pip install` requires
2727
`cuda.bindings` 12.8.0+ or 11.8.6+. Likewise, with nvJitLink it requires 12.8.0+.

cuda_core/docs/source/release/0.X.Y-notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ New features
2525
------------
2626

2727
- Added :attr:`Device.arch` property that returns the compute capability as a string (e.g., '75' for CC 7.5), providing a convenient alternative to manually concatenating the compute capability tuple.
28+
- CUDA 13.x testing support through new ``test-cu13`` dependency group.
2829

2930

3031
New examples

cuda_core/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ cu11 = ["cuda-bindings[all]==11.8.*"]
5050
cu12 = ["cuda-bindings[all]==12.*"]
5151
cu13 = ["cuda-bindings[all]==13.*"]
5252
test = ["cython>=3.0", "setuptools", "pytest>=6.2.4"]
53-
test-cu11 = ["cuda-core[test]", "cupy-cuda11x", "nvidia-cuda-runtime-cu11"] # runtime headers needed by CuPy
54-
test-cu12 = ["cuda-core[test]", "cupy-cuda12x", "nvidia-cuda-runtime-cu12"] # runtime headers needed by CuPy
55-
# TODO add test-cu13 once CuPy is ready
53+
test-cu11 = ["cuda-core[test]", "cupy-cuda11x", "cuda-toolkit[cudart]==11.*"] # runtime headers needed by CuPy
54+
test-cu12 = ["cuda-core[test]", "cupy-cuda12x", "cuda-toolkit[cudart]==12.*"] # runtime headers needed by CuPy
55+
test-cu13 = ["cuda-core[test]", "cupy-cuda13x", "cuda-toolkit[cudart]==13.*"] # runtime headers needed by CuPy
5656

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

cuda_pathfinder/pyproject.toml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,12 @@ test = [
1515
"pytest>=6.2.4",
1616
]
1717
nvidia_wheels_cu12 = [
18-
"nvidia-cublas-cu12",
19-
"nvidia-cuda-nvcc-cu12",
20-
"nvidia-cuda-nvrtc-cu12",
21-
"nvidia-cuda-runtime-cu12",
22-
"nvidia-cufft-cu12",
23-
"nvidia-cufile-cu12; sys_platform != 'win32'",
24-
"nvidia-curand-cu12",
25-
"nvidia-cusolver-cu12",
26-
"nvidia-cusparse-cu12",
27-
"nvidia-npp-cu12",
28-
"nvidia-nvfatbin-cu12",
29-
"nvidia-nvjitlink-cu12",
30-
"nvidia-nvjpeg-cu12",
18+
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg]==12.*",
19+
"cuda-toolkit[cufile]==12.*; sys_platform != 'win32'",
3120
]
3221
nvidia_wheels_cu13 = [
33-
"nvidia-cublas",
34-
"nvidia-cuda-nvcc",
35-
"nvidia-cuda-nvrtc",
36-
"nvidia-cuda-runtime",
37-
"nvidia-cufft",
38-
"nvidia-cufile; sys_platform != 'win32'",
39-
"nvidia-curand",
40-
"nvidia-cusolver",
41-
"nvidia-cusparse",
42-
"nvidia-npp",
43-
"nvidia-nvfatbin",
44-
"nvidia-nvjitlink",
45-
"nvidia-nvjpeg",
46-
"nvidia-nvvm",
22+
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg,nvvm]==13.*",
23+
"cuda-toolkit[cufile]==13.*; sys_platform != 'win32'",
4724
]
4825

4926
[project.urls]

0 commit comments

Comments
 (0)