Skip to content

Commit 7ca56be

Browse files
committed
Update source installation instuctions with Cython considerations
1 parent 4cbab16 commit 7ca56be

File tree

2 files changed

+24
-50
lines changed

2 files changed

+24
-50
lines changed

cuda_bindings/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ Latest dependencies can be found in [requirements.txt](https://github.com/NVIDIA
6363

6464
Multiple testing options are available:
6565

66-
* Cython Unit Tests
6766
* Python Unit Tests
67+
* Cython Unit Tests
6868
* Samples
6969
* Benchmark
7070

cuda_bindings/docs/source/install.md

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,91 +2,65 @@
22

33
## Runtime Requirements
44

5-
CUDA Python is supported on all platforms that CUDA is supported. Specific
6-
dependencies are as follows:
5+
`cuda-python` supports the same platforms as CUDA. Runtime dependencies are:
76

87
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
98
* CUDA Toolkit 12.0 to 12.6
109

11-
```{note} Only the NVRTC redistributable component is required from the CUDA Toolkit. [CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/index.html) Installation Guides can be used for guidance. Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or Local Installer.
10+
```{note} Only the NVRTC redistributable component is required from the CUDA Toolkit. [CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/index.html) Installation Guides can be used for guidance. Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or local installers.
1211
```
1312

1413
## Installing from PyPI
1514

16-
```{code-block} shell
17-
pip install cuda-python
15+
```console
16+
$ pip install cuda-python
1817
```
1918

2019
## Installing from Conda
2120

22-
```{code-block} shell
23-
conda install -c nvidia cuda-python
21+
```console
22+
$ conda install -c nvidia cuda-python
2423
```
2524

26-
Conda packages are assigned a dependency to CUDA Toolkit:
25+
Conda packages have dependencies to CUDA Toolkit components:
2726

28-
* cuda-cudart (Provides CUDA headers to enable writting NVRTC kernels with CUDA types)
27+
* cuda-cudart (Provides CUDA headers to enable writing NVRTC kernels with CUDA types)
2928
* cuda-nvrtc (Provides NVRTC shared library)
3029

3130
## Installing from Source
3231

33-
### Build Requirements
32+
### Requirements
3433

35-
* CUDA Toolkit headers
36-
* Cython
37-
* pyclibrary
34+
* CUDA Toolkit headers[^1]
35+
* [requirements.txt](https://github.com/NVIDIA/cuda-python/blob/main/cuda_bindings/requirements.txt)
3836

39-
Remaining build and test dependencies are outlined in [requirements.txt](https://github.com/NVIDIA/cuda-python/blob/main/requirements.txt)
37+
[^1]: User projects that `cimport` CUDA symbols in Cython must also use CUDA Toolkit (CTK) types as provided by the `cuda-python` major.minor version. This results in CTK headers becoming a transitive dependency of downstream projects through CUDA Python.
4038

41-
The version of CUDA Toolkit headers must match the major.minor of CUDA Python. Note that minor version compatibility will still be maintained.
42-
43-
During the build process, environment variable `CUDA_HOME` or `CUDA_PATH` are used to find the location of CUDA headers. In particular, if your headers are located in path `/usr/local/cuda/include`, then you should set `CUDA_HOME` as follows:
39+
Source builds require that the provided CUDA headers are of the same major.minor version as the `cuda-python` bindings you're trying to build. Despite of 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:
4440

41+
```console
42+
$ export CUDA_HOME=/usr/local/cuda
4543
```
46-
export CUDA_HOME=/usr/local/cuda
44+
45+
```{note} Only `cydriver`, `cyruntime` and `cynvrtc` are impacted by the header requirement.
4746
```
4847
4948
### In-place
5049
5150
To compile the extension in-place, run:
5251
53-
```{code-block} shell
54-
python setup.py build_ext --inplace
52+
```console
53+
$ python setup.py build_ext --inplace
5554
```
5655

57-
To compile for debugging the extension modules with gdb, pass the `--debug`
58-
argument to setup.py.
56+
To compile for debugging the extension modules with gdb, pass the `--debug` argument to setup.py.
5957

6058
### Develop
6159

6260
You can use
6361

64-
```{code-block} shell
65-
pip install -e .
66-
```
67-
68-
to install the module as editible in your current Python environment (e.g. for
69-
testing of porting other libraries to use the binding).
70-
71-
## Build the Docs
72-
73-
```{code-block} shell
74-
conda env create -f docs_src/environment-docs.yml
75-
conda activate cuda-python-docs
76-
```
77-
Then compile and install `cuda-python` following the steps above.
78-
79-
```{code-block} shell
80-
cd docs_src
81-
make html
82-
open build/html/index.html
62+
```console
63+
$ pip install -e .
8364
```
8465

85-
### Publish the Docs
86-
87-
```{code-block} shell
88-
git checkout gh-pages
89-
cd docs_src
90-
make html
91-
cp -a build/html/. ../docs/
92-
```
66+
to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding).

0 commit comments

Comments
 (0)