|
2 | 2 |
|
3 | 3 | ## Runtime Requirements
|
4 | 4 |
|
5 |
| -CUDA Python is supported on all platforms that CUDA is supported. Specific |
6 |
| -dependencies are as follows: |
| 5 | +`cuda.bindings` supports the same platforms as CUDA. Runtime dependencies are: |
7 | 6 |
|
8 | 7 | * Driver: Linux (450.80.02 or later) Windows (456.38 or later)
|
9 |
| -* CUDA Toolkit 12.0 to 12.6 |
| 8 | +* CUDA Toolkit 12.x |
10 | 9 |
|
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} |
| 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). |
12 | 12 | ```
|
13 | 13 |
|
14 | 14 | ## Installing from PyPI
|
15 | 15 |
|
16 |
| -```{code-block} shell |
17 |
| -pip install cuda-python |
| 16 | +```console |
| 17 | +$ pip install cuda-python |
18 | 18 | ```
|
19 | 19 |
|
20 | 20 | ## Installing from Conda
|
21 | 21 |
|
22 |
| -```{code-block} shell |
23 |
| -conda install -c nvidia cuda-python |
| 22 | +```console |
| 23 | +$ conda install -c conda-forge cuda-python |
24 | 24 | ```
|
25 | 25 |
|
26 |
| -Conda packages are assigned a dependency to CUDA Toolkit: |
27 |
| - |
28 |
| -* cuda-cudart (Provides CUDA headers to enable writting NVRTC kernels with CUDA types) |
29 |
| -* cuda-nvrtc (Provides NVRTC shared library) |
30 |
| - |
31 | 26 | ## Installing from Source
|
32 | 27 |
|
33 |
| -### Build Requirements |
| 28 | +### Requirements |
34 | 29 |
|
35 |
| -* CUDA Toolkit headers |
36 |
| -* Cython |
37 |
| -* pyclibrary |
| 30 | +* CUDA Toolkit headers[^1] |
38 | 31 |
|
39 |
| -Remaining build and test dependencies are outlined in [requirements.txt](https://github.com/NVIDIA/cuda-python/blob/main/requirements.txt) |
| 32 | +[^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. |
40 | 33 |
|
41 |
| -The version of CUDA Toolkit headers must match the major.minor of CUDA Python. Note that minor version compatibility will still be maintained. |
| 34 | +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: |
42 | 35 |
|
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: |
44 |
| - |
45 |
| -``` |
46 |
| -export CUDA_HOME=/usr/local/cuda |
| 36 | +```console |
| 37 | +$ export CUDA_HOME=/usr/local/cuda |
47 | 38 | ```
|
48 | 39 |
|
49 |
| -### In-place |
50 |
| - |
51 |
| -To compile the extension in-place, run: |
52 |
| - |
53 |
| -```{code-block} shell |
54 |
| -python setup.py build_ext --inplace |
| 40 | +```{note} |
| 41 | +Only `cydriver`, `cyruntime` and `cynvrtc` are impacted by the header requirement. |
55 | 42 | ```
|
56 | 43 |
|
57 |
| -To compile for debugging the extension modules with gdb, pass the `--debug` |
58 |
| -argument to setup.py. |
59 |
| - |
60 |
| -### Develop |
| 44 | +### Editable Install |
61 | 45 |
|
62 | 46 | You can use
|
63 | 47 |
|
64 |
| -```{code-block} shell |
65 |
| -pip install -e . |
| 48 | +```console |
| 49 | +$ pip install -v -e . |
66 | 50 | ```
|
67 | 51 |
|
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 |
83 |
| -``` |
84 |
| - |
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 |
| -``` |
| 52 | +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