Skip to content

Commit

Permalink
Deploy doc preview for PR 427 (fc63838)
Browse files Browse the repository at this point in the history
  • Loading branch information
cuda-python-bot committed Feb 5, 2025
1 parent ec4622d commit 8ecb3a5
Show file tree
Hide file tree
Showing 245 changed files with 152,707 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/pr-preview/pr-427/cuda-bindings/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; url=latest/" />
<link rel="canonical" href="latest/" />
</head>
<body>
<p>If this page does not refresh automatically, then please direct your browser to
<a href="latest/">our latest docs</a>.
</p>
</body>
</html>
4 changes: 4 additions & 0 deletions docs/pr-preview/pr-427/cuda-bindings/latest/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ffd0f7ef4235f26a98f42388dfc8ff9f
tags: 645f666f9bcd5a90fca523b33c5a78b7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/pr-preview/pr-427/cuda-bindings/latest/_sources/api.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-------------------------
CUDA Python API Reference
-------------------------

.. toctree::
:maxdepth: 3
:caption: CaptionHolder:

module/driver
module/runtime
module/nvrtc
module/nvjitlink
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Environment Variables

## Build-Time Environment Variables

- `CUDA_HOME` or `CUDA_PATH`: Specifies the location of the CUDA Toolkit.

- `CUDA_PYTHON_PARSER_CACHING` : bool, toggles the caching of parsed header files during the cuda-bindings build process. If caching is enabled (`CUDA_PYTHON_PARSER_CACHING` is True), the cache path is set to ./cache_<library_name>, where <library_name> is derived from the cuda toolkit libraries used to build cuda-bindings.

- `CUDA_PYTHON_PARALLEL_LEVEL` (previously `PARALLEL_LEVEL`) : int, sets the number of threads used in the compilation of extension modules. Not setting it or setting it to 0 would disable parallel builds.

## Runtime Environment Variables

- `CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM` : When set to 1, the default stream is the per-thread default stream. When set to 0, the default stream is the legacy default stream. This defaults to 0, for the legacy default stream. See [Stream Synchronization Behavior](https://docs.nvidia.com/cuda/cuda-runtime-api/stream-sync-behavior.html) for an explanation of the legacy and per-thread default streams.
23 changes: 23 additions & 0 deletions docs/pr-preview/pr-427/cuda-bindings/latest/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
``cuda.bindings``: Low-level Python Bindings for CUDA
=====================================================

.. toctree::
:maxdepth: 2
:caption: Contents:

release
install.md
overview.md
motivation.md
environment_variables.md
api
tips_and_tricks
support


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Installation

## Runtime Requirements

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

* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
* CUDA Toolkit 12.x

```{note}
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).
```

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.


## Installing from PyPI

```console
$ pip install -U cuda-python
```

Install all optional dependencies with:
```{code-block} shell
pip install -U cuda-python[all]
```

Where the optional dependencies are:

* nvidia-cuda-nvrtc-cu12 (Provides NVRTC shared library)
* nvidia-nvjitlink-cu12>=12.3 (Provides nvJitLink shared library)


## Installing from Conda

```console
$ conda install -c conda-forge cuda-python
```


## Installing from Source

### Requirements

* CUDA Toolkit headers[^1]

[^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.

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:

```console
$ export CUDA_HOME=/usr/local/cuda
```

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

```{note}
Only `cydriver`, `cyruntime` and `cynvrtc` are impacted by the header requirement.
```


### Editable Install

You can use

```console
$ pip install -v -e .
```

to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding).
Loading

0 comments on commit 8ecb3a5

Please sign in to comment.