Skip to content

Commit d1ab0dc

Browse files
author
cuda-python-bot
committed
Deploy doc preview for PR 682 (f72b1c0)
1 parent da48976 commit d1ab0dc

289 files changed

Lines changed: 166534 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="refresh" content="0; url=latest/" />
6+
<link rel="canonical" href="latest/" />
7+
</head>
8+
<body>
9+
<p>If this page does not refresh automatically, then please direct your browser to
10+
<a href="latest/">our latest docs</a>.
11+
</p>
12+
</body>
13+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Sphinx build info version 1
2+
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3+
config: c0e5f9a7ea06601895d5eebf8b502b08
4+
tags: 645f666f9bcd5a90fca523b33c5a78b7
332 KB
Loading
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
3+
-------------------------
4+
CUDA Python API Reference
5+
-------------------------
6+
7+
.. toctree::
8+
:maxdepth: 3
9+
:caption: CaptionHolder:
10+
11+
module/driver
12+
module/runtime
13+
module/nvrtc
14+
module/nvjitlink
15+
module/nvvm
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Code of Conduct
2+
3+
## Overview
4+
5+
Define the code of conduct followed and enforced for the `cuda.bindings` project.
6+
7+
## Our Pledge
8+
9+
In the interest of fostering an open and welcoming environment, we as
10+
contributors and maintainers pledge to making participation in our project and
11+
our community a harassment-free experience for everyone, regardless of age, body
12+
size, disability, ethnicity, sex characteristics, gender identity and expression,
13+
level of experience, education, socio-economic status, nationality, personal
14+
appearance, race, religion, or sexual identity and orientation.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to creating a positive environment
19+
include:
20+
21+
* Using welcoming and inclusive language
22+
* Being respectful of differing viewpoints and experiences
23+
* Gracefully accepting constructive criticism
24+
* Focusing on what is best for the community
25+
* Showing empathy towards other community members
26+
27+
Examples of unacceptable behavior by participants include:
28+
29+
* The use of sexualized language or imagery and unwelcome sexual attention or
30+
advances
31+
* Trolling, insulting/derogatory comments, and personal or political attacks
32+
* Public or private harassment
33+
* Publishing others' private information, such as a physical or electronic
34+
address, without explicit permission
35+
* Other conduct which could reasonably be considered inappropriate in a
36+
professional setting
37+
38+
## Our Responsibilities
39+
40+
Project maintainers are responsible for clarifying the standards of acceptable
41+
behavior and are expected to take appropriate and fair corrective action in
42+
response to any instances of unacceptable behavior.
43+
44+
Project maintainers have the right and responsibility to remove, edit, or
45+
reject comments, commits, code, wiki edits, issues, and other contributions
46+
that are not aligned to this Code of Conduct, or to ban temporarily or
47+
permanently any contributor for other behaviors that they deem inappropriate,
48+
threatening, offensive, or harmful.
49+
50+
## Scope
51+
52+
This Code of Conduct applies both within project spaces and in public spaces
53+
when an individual is representing the project or its community. Examples of
54+
representing a project or community include using an official project e-mail
55+
address, posting via an official social media account, or acting as an appointed
56+
representative at an online or offline event. Representation of a project may be
57+
further defined and clarified by project maintainers.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported by contacting the project team at
63+
[cuda-python-conduct@nvidia.com](mailto:cuda-python-conduct@nvidia.com) All
64+
complaints will be reviewed and investigated and will result in a response that
65+
is deemed necessary and appropriate to the circumstances. The project team is
66+
obligated to maintain confidentiality with regard to the reporter of an
67+
incident. Further details of specific enforcement policies may be posted
68+
separately.
69+
70+
Project maintainers who do not follow or enforce the Code of Conduct in good
71+
faith may face temporary or permanent repercussions as determined by other
72+
members of the project's leadership.
73+
74+
## Attribution
75+
76+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
77+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
78+
79+
[homepage]: https://www.contributor-covenant.org
80+
81+
For answers to common questions about this code of conduct, see
82+
https://www.contributor-covenant.org/faq
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Contributing
2+
3+
Thank you for your interest in contributing to `cuda-bindings`! Based on the type of contribution, it will fall into two categories:
4+
5+
1. You want to report a bug, feature request, or documentation issue
6+
- File an [issue](https://github.com/NVIDIA/cuda-python/issues/new/choose)
7+
describing what you encountered or what you want to see changed.
8+
- The NVIDIA team will evaluate the issues and triage them, scheduling
9+
them for a release. If you believe the issue needs priority attention
10+
comment on the issue to notify the team.
11+
2. You want to implement a feature, improvement, or bug fix:
12+
- At this time we do not accept code contributions.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Environment Variables
2+
3+
## Build-Time Environment Variables
4+
5+
- `CUDA_HOME` or `CUDA_PATH`: Specifies the location of the CUDA Toolkit.
6+
7+
- `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.
8+
9+
- `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.
10+
11+
## Runtime Environment Variables
12+
13+
- `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.
14+
15+
16+
## Test-Time Environment Variables
17+
18+
- `CUDA_PYTHON_TESTING_WITH_COMPUTE_SANITIZER` : When set to 1, tests are skipped that would cause [compute-sanitizer](https://docs.nvidia.com/compute-sanitizer/ComputeSanitizer/index.html) to raise an error.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
3+
``cuda.bindings``: Low-level Python Bindings for CUDA
4+
=====================================================
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:caption: Contents:
9+
10+
release
11+
install.md
12+
overview.md
13+
motivation.md
14+
environment_variables.md
15+
api
16+
tips_and_tricks
17+
support
18+
contribute.md
19+
conduct.md
20+
license
21+
22+
23+
Indices and tables
24+
==================
25+
26+
* :ref:`genindex`
27+
* :ref:`modindex`
28+
* :ref:`search`
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Installation
2+
3+
## Runtime Requirements
4+
5+
`cuda.bindings` supports the same platforms as CUDA. Runtime dependencies are:
6+
7+
* Linux (x86-64, arm64) and Windows (x86-64)
8+
* Python 3.9 - 3.13
9+
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
10+
* Optionally, NVRTC, nvJitLink, and NVVM from CUDA Toolkit 12.x
11+
12+
```{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).
14+
```
15+
16+
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.
17+
18+
19+
## Installing from PyPI
20+
21+
```console
22+
$ pip install -U cuda-python
23+
```
24+
25+
Install all optional dependencies with:
26+
```{code-block} shell
27+
pip install -U cuda-python[all]
28+
```
29+
30+
Where the optional dependencies are:
31+
32+
* nvidia-cuda-nvrtc-cu12 (Provides NVRTC shared library)
33+
* nvidia-nvjitlink-cu12>=12.3 (Provides nvJitLink shared library)
34+
* nvidia-cuda-nvcc-cu12 (Provides NVVM shared library)
35+
36+
37+
## Installing from Conda
38+
39+
```console
40+
$ conda install -c conda-forge cuda-python
41+
```
42+
43+
44+
## Installing from Source
45+
46+
### Requirements
47+
48+
* CUDA Toolkit headers[^1]
49+
* CUDA Runtime static library[^2]
50+
51+
[^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.
52+
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+
55+
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:
56+
57+
```console
58+
$ export CUDA_HOME=/usr/local/cuda
59+
$ export LIBRARY_PATH=$CUDA_HOME/lib64:$LIBRARY_PATH
60+
```
61+
62+
See [Environment Variables](environment_variables.md) for a description of other build-time environment variables.
63+
64+
```{note}
65+
Only `cydriver`, `cyruntime` and `cynvrtc` are impacted by the header requirement.
66+
```
67+
68+
69+
### Editable Install
70+
71+
You can use
72+
73+
```console
74+
$ pip install -v -e .
75+
```
76+
77+
to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
2+
3+
Software License Agreement
4+
**************************
5+
6+
.. literalinclude:: ../../LICENSE
7+
:language: text

0 commit comments

Comments
 (0)