Skip to content

Commit e907c78

Browse files
authored
Merge branch 'main' into copilot/fix-756
2 parents 371490e + 459bbcb commit e907c78

File tree

9 files changed

+38
-50
lines changed

9 files changed

+38
-50
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/cuda/core/experimental/_linker.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,15 @@ def _init_nvjitlink(self):
205205
self.formatted_options.append("-time")
206206
if self.verbose is not None:
207207
self.formatted_options.append("-verbose")
208-
if self.link_time_optimization is not None:
208+
if self.link_time_optimization is not None and self.link_time_optimization:
209209
self.formatted_options.append("-lto")
210210
if self.ptx is not None:
211211
self.formatted_options.append("-ptx")
212212
if self.optimization_level is not None:
213213
self.formatted_options.append(f"-O{self.optimization_level}")
214-
if self.debug is not None:
214+
if self.debug is not None and self.debug:
215215
self.formatted_options.append("-g")
216-
if self.lineinfo is not None:
216+
if self.lineinfo is not None and self.lineinfo:
217217
self.formatted_options.append("-lineinfo")
218218
if self.ftz is not None:
219219
self.formatted_options.append(f"-ftz={'true' if self.ftz else 'false'}")

cuda_core/cuda/core/experimental/_program.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ def __post_init__(self):
244244
self._formatted_options.append("--device-debug")
245245
if self.lineinfo is not None and self.lineinfo:
246246
self._formatted_options.append("--generate-line-info")
247-
if self.device_code_optimize is not None:
248-
self._formatted_options.append(f"--dopt={'on' if self.device_code_optimize else 'off'}")
247+
if self.device_code_optimize is not None and self.device_code_optimize:
248+
self._formatted_options.append("--dopt=on")
249249
if self.ptxas_options is not None:
250250
opt_name = "--ptxas-options"
251251
if isinstance(self.ptxas_options, str):
@@ -351,7 +351,7 @@ def _as_bytes(self):
351351

352352
def __repr__(self):
353353
# __TODO__ improve this
354-
return self._formatted_options
354+
return str(self._formatted_options)
355355

356356

357357
ProgramHandleT = Union["cuda.bindings.nvrtc.nvrtcProgram", LinkerHandleT]

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
@@ -26,6 +26,7 @@ New features
2626
------------
2727

2828
- 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.
29+
- CUDA 13.x testing support through new ``test-cu13`` dependency group.
2930

3031

3132
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)