Skip to content

Commit 899ccee

Browse files
authored
Merge pull request #547 from leofang/docs_129
Various documentation improvements
2 parents 3eaa962 + 2759ae8 commit 899ccee

File tree

14 files changed

+73
-61
lines changed

14 files changed

+73
-61
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ CUDA Python is the home for accessing NVIDIA’s CUDA platform from Python. It c
44

55
* [cuda.core](https://nvidia.github.io/cuda-python/cuda-core/latest): Pythonic access to CUDA Runtime and other core functionalities
66
* [cuda.bindings](https://nvidia.github.io/cuda-python/cuda-bindings/latest): Low-level Python bindings to CUDA C APIs
7-
* [cuda.cooperative](https://nvidia.github.io/cccl/cuda_cooperative/): A Python package for easy access to highly efficient and customizable parallel algorithms, like `sort`, `scan`, `reduce`, `transform`, etc.
8-
* [cuda.parallel](https://nvidia.github.io/cccl/cuda_parallel/): A Python package providing CUB's reusable block-wide and warp-wide primitives for use within Numba CUDA kernels
7+
* [cuda.cooperative](https://nvidia.github.io/cccl/cuda_cooperative/): A Python package providing CCCL's reusable block-wide and warp-wide *device* primitives for use within Numba CUDA kernels
8+
* [cuda.parallel](https://nvidia.github.io/cccl/cuda_parallel/): A Python package for easy access to CCCL's highly efficient and customizable parallel algorithms, like `sort`, `scan`, `reduce`, `transform`, etc, that are callable on the *host*
9+
* [numba.cuda](https://nvidia.github.io/numba-cuda/): Numba's target for CUDA GPU programming by directly compiling a restricted subset of Python code into CUDA kernels and device functions following the CUDA execution model.
910

1011
For access to NVIDIA CPU & GPU Math Libraries, please refer to [nvmath-python](https://docs.nvidia.com/cuda/nvmath-python/latest).
1112

12-
CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. All of the previously available functionalities from the cuda-python package will continue to be available, please refer to the [cuda.bindings](https://nvidia.github.io/cuda-python/cuda-bindings/latest) documentation for installation guide and further detail.
13+
CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. All of the previously available functionalities from the `cuda-python` package will continue to be available, please refer to the [cuda.bindings](https://nvidia.github.io/cuda-python/cuda-bindings/latest) documentation for installation guide and further detail.
1314

1415
## cuda-python as a metapackage
1516

@@ -37,9 +38,4 @@ The list of available interfaces are:
3738
* CUDA Runtime
3839
* NVRTC
3940
* nvJitLink
40-
41-
## Supported Python Versions
42-
43-
All `cuda-python` subpackages follows CPython [End-Of-Life](https://devguide.python.org/versions/) schedule for supported Python version guarantee.
44-
45-
Before dropping support there will be an issue raised as a notice.
41+
* NVVM

cuda_bindings/DESCRIPTION.rst

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
1-
*******************************************************
1+
****************************************
22
cuda.bindings: Low-level CUDA interfaces
3-
*******************************************************
3+
****************************************
44

5-
`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the `Overview <https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html>`_ for the workflow and performance results.
5+
`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and 1:1 access to the CUDA host APIs from Python. Checkout the `Overview <https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html>`_ for the workflow and performance results.
66

7-
Installation
8-
============
9-
10-
`cuda.bindings` can be installed from:
11-
12-
* PyPI
13-
* Conda (conda-forge/nvidia channels)
14-
* Source builds
15-
16-
Differences between these options are described in `Installation <https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html>`_ documentation. Each package guarantees minor version compatibility.
17-
18-
Runtime Dependencies
19-
====================
20-
21-
`cuda.bindings` is supported on all the same platforms as CUDA. Specific dependencies are as follows:
22-
23-
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
24-
* CUDA Toolkit 12.x
25-
26-
Only the NVRTC and nvJitLink redistributable components are required from the CUDA Toolkit, which can be obtained via PyPI, Conda, 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).
7+
For the installation instruction, please refer to the `Installation <https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html>`_ page.

cuda_bindings/README.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
# `cuda.bindings`: Low-level CUDA interfaces
22

3-
`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the [Overview](https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html) for the workflow and performance results.
3+
`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the [Overview page](https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html) for the workflow and performance results.
44

55
`cuda.bindings` is a subpackage of `cuda-python`.
66

77
## Installing
88

9-
`cuda.bindings` can be installed from:
10-
11-
* PyPI
12-
* Conda (conda-forge/nvidia channels)
13-
* Source builds
14-
15-
Differences between these options are described in [Installation](https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html) documentation. Each package guarantees minor version compatibility.
16-
17-
## Runtime Dependencies
18-
19-
`cuda.bindings` is supported on all the same platforms as CUDA. Specific dependencies are as follows:
20-
21-
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
22-
* CUDA Toolkit 12.x
23-
24-
Only the NVRTC and nvJitLink redistributable components are required from the CUDA Toolkit, which can be obtained via PyPI, Conda, 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).
9+
Please refer to the [Installation page](https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html) for instructions and required/optional dependencies.
2510

2611
## Developing
2712

cuda_bindings/docs/build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fi
1717
# version selector or directory structure.
1818
if [[ -z "${SPHINX_CUDA_BINDINGS_VER}" ]]; then
1919
export SPHINX_CUDA_BINDINGS_VER=$(python -c "from importlib.metadata import version; \
20-
ver = '.'.join(str(version('cuda-python')).split('.')[:3]); \
20+
ver = '.'.join(str(version('cuda-bindings')).split('.')[:3]); \
2121
print(ver)" \
2222
| awk -F'+' '{print $1}')
2323
fi

cuda_bindings/docs/source/conf.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = "cuda.bindings"
21-
copyright = "2021-2024, NVIDIA"
21+
copyright = "2021-2025, NVIDIA"
2222
author = "NVIDIA"
2323

2424
# The full version, including alpha/beta/rc tags
@@ -30,7 +30,14 @@
3030
# Add any Sphinx extension module names here, as strings. They can be
3131
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3232
# ones.
33-
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "myst_nb", "enum_tools.autoenum"]
33+
extensions = [
34+
"sphinx.ext.autodoc",
35+
"sphinx.ext.napoleon",
36+
"sphinx.ext.intersphinx",
37+
"myst_nb",
38+
"enum_tools.autoenum",
39+
"sphinx_copybutton",
40+
]
3441

3542
nb_execution_mode = "off"
3643
numfig = True
@@ -85,6 +92,16 @@
8592
# so a file named "default.css" will overwrite the builtin "default.css".
8693
html_static_path = ["_static"]
8794

95+
# skip cmdline prompts
96+
copybutton_exclude = ".linenos, .gp"
97+
98+
intersphinx_mapping = {
99+
"python": ("https://docs.python.org/3/", None),
100+
"numpy": ("https://numpy.org/doc/stable/", None),
101+
"nvvm": ("https://docs.nvidia.com/cuda/libnvvm-api/", None),
102+
"nvjitlink": ("https://docs.nvidia.com/cuda/nvjitlink/", None),
103+
}
104+
88105
suppress_warnings = [
89106
# for warnings about multiple possible targets, see NVIDIA/cuda-python#152
90107
"ref.python",

cuda_bindings/docs/source/install.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
`cuda.bindings` supports the same platforms as CUDA. Runtime dependencies are:
66

7+
* Linux (x86-64, arm64) and Windows (x86-64)
8+
* Python 3.9 - 3.13
79
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
8-
* CUDA Toolkit 12.x
10+
* Optionally, NVRTC, nvJitLink, and NVVM from CUDA Toolkit 12.x
911

1012
```{note}
11-
Only the NVRTC and nvJitLink redistributable components are required from the CUDA Toolkit, which can be obtained via PyPI, Conda, 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 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).
1214
```
1315

1416
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.
@@ -44,13 +46,17 @@ $ conda install -c conda-forge cuda-python
4446
### Requirements
4547

4648
* CUDA Toolkit headers[^1]
49+
* CUDA Runtime static library[^2]
4750

4851
[^1]: User projects that `cimport` CUDA symbols in Cython must also use CUDA Toolkit (CTK) types as provided by the `cuda.bindings` major.minor version. This results in CTK headers becoming a transitive dependency of downstream projects through CUDA Python.
4952

53+
[^2]: The CUDA Runtime static library (`libcudart_static.a` on Linux, `cudart_static.lib` on Windows) is part of the CUDA Toolkit. If using conda packages, it is contained in the `cuda-cudart-static` package.
54+
5055
Source builds require that the provided CUDA headers are of the same major.minor version as the `cuda.bindings` you're trying to build. Despite this requirement, note that the minor version compatibility is still maintained. Use the `CUDA_HOME` (or `CUDA_PATH`) environment variable to specify the location of your headers. For example, if your headers are located in `/usr/local/cuda/include`, then you should set `CUDA_HOME` with:
5156

5257
```console
5358
$ export CUDA_HOME=/usr/local/cuda
59+
$ export LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH
5460
```
5561

5662
See [Environment Variables](environment_variables.md) for a description of other build-time environment variables.

cuda_bindings/docs/source/module/nvjitlink.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. default-role:: cpp:any
2+
13
nvjitlink
24
=========
35

cuda_bindings/docs/source/module/nvvm.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. default-role:: cpp:any
2+
13
nvvm
24
====
35

cuda_bindings/docs/source/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ argument on either host or device. Since we already prepared each of our argumen
205205
construction of our final contiguous array is done by retrieving the `XX.ctypes.data`
206206
of each kernel argument.
207207

208-
```{code-cell} python
208+
```python
209209
args = [a, dX, dY, dOut, n]
210210
args = np.array([arg.ctypes.data for arg in args], dtype=np.uint64)
211211
```

cuda_bindings/docs/source/release/11.8.7-notes.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,9 @@ Highlights
99

1010
* The ``cuda.bindings.nvvm`` Python module was added, wrapping the
1111
`libNVVM C API <https://docs.nvidia.com/cuda/libnvvm-api/>`_.
12+
13+
14+
Bug fixes
15+
---------
16+
17+
* Fix segfault when converting char* NULL to bytes

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,19 @@ Highlights
1111
`libNVVM C API <https://docs.nvidia.com/cuda/libnvvm-api/>`_.
1212
* Source build error checking added for missing required headers
1313
* Statically link CUDA Runtime instead of reimplementing it
14-
* Fix performance hint warnings raised by Cython 3
1514
* Move stream callback wrappers to the Python layer
15+
* Return code construction is made faster
16+
17+
Bug fixes
18+
---------
19+
20+
* Fix segfault when converting char* NULL to bytes
21+
22+
23+
Miscellaneous
24+
-------------
25+
26+
* Benchmark suite is updated
27+
* Improvements in the introductory code samples
28+
* Fix performance hint warnings raised by Cython 3
29+
* Improvements in the Overview page

cuda_core/docs/source/install.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies are as follows:
1212

1313
[^1]: Including `cuda-python`.
1414

15-
`cuda.core` supports Python 3.9 - 3.12, on Linux (x86-64, arm64) and Windows (x86-64).
15+
`cuda.core` supports Python 3.9 - 3.13, on Linux (x86-64, arm64) and Windows (x86-64).
1616

1717
## Installing from PyPI
1818

@@ -22,8 +22,8 @@ $ pip install cuda-core[cu12]
2222
```
2323
and likewise use `[cu11]` for CUDA 11.
2424

25-
Note that using `cuda.core` with NVRTC or nvJitLink installed from PyPI via `pip install` is currently
26-
not supported. This will be fixed in a future release.
25+
Note that using `cuda.core` with NVRTC or nvJitLink installed from PyPI via `pip install` requires
26+
`cuda.bindings` 12.8.0+ or 11.8.6+.
2727

2828
## Installing from Conda (conda-forge)
2929

cuda_python/docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,5 @@
9595
.. _cuda.bindings: {CUDA_PYTHON_DOMAIN}/cuda-bindings/latest
9696
.. _cuda.cooperative: https://nvidia.github.io/cccl/cuda_cooperative/
9797
.. _cuda.parallel: https://nvidia.github.io/cccl/cuda_parallel/
98+
.. _numba.cuda: https://nvidia.github.io/numba-cuda/
9899
"""

cuda_python/docs/source/index.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ multiple components:
66

77
- `cuda.core`_: Pythonic access to CUDA runtime and other core functionalities
88
- `cuda.bindings`_: Low-level Python bindings to CUDA C APIs
9-
- `cuda.cooperative`_: A Python package for easy access to highly efficient and customizable parallel algorithms, like `sort`, `scan`, `reduce`, `transform`, etc.
10-
- `cuda.parallel`_: A Python package providing CUB's reusable block-wide and warp-wide primitives for use within Numba CUDA kernels
9+
- `cuda.cooperative`_: A Python package providing CCCL's reusable block-wide and warp-wide *device* primitives for use within Numba CUDA kernels
10+
- `cuda.parallel`_: A Python package for easy access to CCCL's highly efficient and customizable parallel algorithms, like ``sort``, ``scan``, ``reduce``, ``transform``, etc, that are callable on the *host*
11+
- `numba.cuda`_: Numba's target for CUDA GPU programming by directly compiling a restricted subset of Python code into CUDA kernels and device functions following the CUDA execution model.
1112

1213
For access to NVIDIA CPU & GPU Math Libraries, please refer to `nvmath-python`_.
1314

@@ -30,5 +31,6 @@ be available, please refer to the `cuda.bindings`_ documentation for installatio
3031
cuda.bindings <https://nvidia.github.io/cuda-python/cuda-bindings/latest>
3132
cuda.cooperative <https://nvidia.github.io/cccl/cuda_cooperative>
3233
cuda.parallel <https://nvidia.github.io/cccl/cuda_parallel>
34+
numba.cuda <https://nvidia.github.io/numba-cuda/>
3335
conduct.md
3436
contribute.md

0 commit comments

Comments
 (0)