Skip to content

Commit 1c0eeeb

Browse files
Copilotleofang
andcommitted
Phase 2: Convert markdown syntax to ReST syntax in all 38 files
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
1 parent 41320c3 commit 1c0eeeb

38 files changed

Lines changed: 1014 additions & 847 deletions

cuda_bindings/docs/source/conduct.rst

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# Code of Conduct
1+
Code of Conduct
2+
===============
23

3-
## Overview
4+
Overview
5+
--------
46

5-
Define the code of conduct followed and enforced for the `cuda.bindings` project.
7+
Define the code of conduct followed and enforced for the ``cuda.bindings`` project.
68

7-
## Our Pledge
9+
Our Pledge
10+
----------
811

912
In the interest of fostering an open and welcoming environment, we as
1013
contributors and maintainers pledge to making participation in our project and
@@ -13,7 +16,8 @@ size, disability, ethnicity, sex characteristics, gender identity and expression
1316
level of experience, education, socio-economic status, nationality, personal
1417
appearance, race, religion, or sexual identity and orientation.
1518

16-
## Our Standards
19+
Our Standards
20+
-------------
1721

1822
Examples of behavior that contributes to creating a positive environment
1923
include:
@@ -35,7 +39,8 @@ Examples of unacceptable behavior by participants include:
3539
* Other conduct which could reasonably be considered inappropriate in a
3640
professional setting
3741

38-
## Our Responsibilities
42+
Our Responsibilities
43+
--------------------
3944

4045
Project maintainers are responsible for clarifying the standards of acceptable
4146
behavior and are expected to take appropriate and fair corrective action in
@@ -47,7 +52,8 @@ that are not aligned to this Code of Conduct, or to ban temporarily or
4752
permanently any contributor for other behaviors that they deem inappropriate,
4853
threatening, offensive, or harmful.
4954

50-
## Scope
55+
Scope
56+
-----
5157

5258
This Code of Conduct applies both within project spaces and in public spaces
5359
when an individual is representing the project or its community. Examples of
@@ -56,11 +62,12 @@ address, posting via an official social media account, or acting as an appointed
5662
representative at an online or offline event. Representation of a project may be
5763
further defined and clarified by project maintainers.
5864

59-
## Enforcement
65+
Enforcement
66+
-----------
6067

6168
Instances of abusive, harassing, or otherwise unacceptable behavior may be
6269
reported by contacting the project team at
63-
[cuda-python-conduct@nvidia.com](mailto:cuda-python-conduct@nvidia.com) All
70+
`cuda-python-conduct@nvidia.com <mailto:cuda-python-conduct@nvidia.com>`_ All
6471
complaints will be reviewed and investigated and will result in a response that
6572
is deemed necessary and appropriate to the circumstances. The project team is
6673
obligated to maintain confidentiality with regard to the reporter of an
@@ -71,7 +78,8 @@ Project maintainers who do not follow or enforce the Code of Conduct in good
7178
faith may face temporary or permanent repercussions as determined by other
7279
members of the project's leadership.
7380

74-
## Attribution
81+
Attribution
82+
-----------
7583

7684
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
7785
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

cuda_bindings/docs/source/contribute.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Contributing
1+
Contributing
2+
============
23

3-
Thank you for your interest in contributing to `cuda-bindings`! Based on the type of contribution, it will fall into two categories:
4+
Thank you for your interest in contributing to ``cuda-bindings``! Based on the type of contribution, it will fall into two categories:
45

56
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+
- File an `issue <https://github.com/NVIDIA/cuda-python/issues/new/choose>`_
78
describing what you encountered or what you want to see changed.
89
- The NVIDIA team will evaluate the issues and triage them, scheduling
910
them for a release. If you believe the issue needs priority attention
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
# Environment Variables
1+
Environment Variables
2+
=====================
23

3-
## Build-Time Environment Variables
4+
Build-Time Environment Variables
5+
--------------------------------
46

5-
- `CUDA_HOME` or `CUDA_PATH`: Specifies the location of the CUDA Toolkit.
7+
- ``CUDA_HOME`` or ``CUDA_PATH``: Specifies the location of the CUDA Toolkit.
68

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.
9+
- ``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.
810

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.
11+
- ``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.
1012

11-
## Runtime Environment Variables
13+
Runtime Environment Variables
14+
-----------------------------
1215

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.
16+
- ``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.
Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,91 @@
1-
# Installation
1+
Installation
2+
============
23

3-
## Runtime Requirements
4+
Runtime Requirements
5+
--------------------
46

5-
`cuda.bindings` supports the same platforms as CUDA. Runtime dependencies are:
7+
``cuda.bindings`` supports the same platforms as CUDA. Runtime dependencies are:
68

79
* Linux (x86-64, arm64) and Windows (x86-64)
810
* Python 3.9 - 3.13
911
* Driver: Linux (580.65.06 or later) Windows (580.88 or later)
1012
* Optionally, NVRTC, nvJitLink, NVVM, and cuFile from CUDA Toolkit 13.x
1113

12-
```{note}
13-
The optional CUDA Toolkit components are now installed via the `cuda-toolkit` metapackage from PyPI for improved dependency resolution. Components can also be installed via 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-
```
14+
.. note::
1515

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.
16+
The optional CUDA Toolkit components are now installed via the ``cuda-toolkit`` metapackage from PyPI for improved dependency resolution. Components can also be installed via 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).
1717

18+
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.
1819

19-
## Installing from PyPI
20+
Installing from PyPI
21+
--------------------
2022

21-
```console
22-
$ pip install -U cuda-python
23-
```
23+
.. code-block:: console
24+
25+
$ pip install -U cuda-python
2426
2527
Install all optional dependencies with:
26-
```{code-block} shell
27-
pip install -U cuda-python[all]
28-
```
28+
.. code-block:: shell
29+
30+
pip install -U cuda-python[all]
2931
3032
Where the optional dependencies include:
3133

32-
* `nvidia-cuda-nvrtc` (NVRTC runtime compilation library)
33-
* `nvidia-nvjitlink` (nvJitLink library)
34-
* `nvidia-nvvm` (NVVM library)
35-
* `nvidia-cufile` (cuFile library, Linux only)
34+
* ``nvidia-cuda-nvrtc`` (NVRTC runtime compilation library)
35+
* ``nvidia-nvjitlink`` (nvJitLink library)
36+
* ``nvidia-nvvm`` (NVVM library)
37+
* ``nvidia-cufile`` (cuFile library, Linux only)
38+
39+
These are now installed through the ``cuda-toolkit`` metapackage for improved dependency resolution.
3640

37-
These are now installed through the `cuda-toolkit` metapackage for improved dependency resolution.
41+
Installing from Conda
42+
---------------------
3843

44+
.. code-block:: console
3945
40-
## Installing from Conda
46+
$ conda install -c conda-forge cuda-python
4147
42-
```console
43-
$ conda install -c conda-forge cuda-python
44-
```
48+
.. note::
4549

46-
```{note}
47-
When using conda, the `cuda-version` metapackage can be used to control the versions of CUDA Toolkit components that are installed to the conda environment.
48-
```
50+
When using conda, the ``cuda-version`` metapackage can be used to control the versions of CUDA Toolkit components that are installed to the conda environment.
4951

5052
For example:
51-
```console
52-
$ conda install -c conda-forge cuda-python cuda-version=13
53-
```
53+
.. code-block:: console
5454
55+
$ conda install -c conda-forge cuda-python cuda-version=13
5556
56-
## Installing from Source
57+
Installing from Source
58+
----------------------
5759

58-
### Requirements
60+
Requirements
61+
^^^^^^^^^^^^
5962

6063
* CUDA Toolkit headers[^1]
6164
* CUDA Runtime static library[^2]
6265

63-
[^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.
66+
[^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.
6467

65-
[^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.
68+
[^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.
6669

67-
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:
70+
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:
6871

69-
```console
70-
$ export CUDA_HOME=/usr/local/cuda
71-
```
72+
.. code-block:: console
7273
73-
See [Environment Variables](environment_variables.md) for a description of other build-time environment variables.
74+
$ export CUDA_HOME=/usr/local/cuda
7475
75-
```{note}
76-
Only `cydriver`, `cyruntime` and `cynvrtc` are impacted by the header requirement.
77-
```
76+
See `Environment Variables <environment_variables.md>`_ for a description of other build-time environment variables.
7877

78+
.. note::
7979

80-
### Editable Install
80+
Only ``cydriver``, ``cyruntime`` and ``cynvrtc`` are impacted by the header requirement.
81+
82+
Editable Install
83+
^^^^^^^^^^^^^^^^
8184

8285
You can use
8386

84-
```console
85-
$ pip install -v -e .
86-
```
87+
.. code-block:: console
88+
89+
$ pip install -v -e .
8790
8891
to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding).

cuda_bindings/docs/source/motivation.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
1-
# Motivation
2-
## What is CUDA Python?
1+
Motivation
2+
==========
3+
What is CUDA Python?
4+
--------------------
35

4-
NVIDIA’s CUDA Python provides [Cython](https://cython.org/) bindings and Python
6+
NVIDIA’s CUDA Python provides `Cython <https://cython.org/>`_ bindings and Python
57
wrappers for the driver and runtime API for existing toolkits and libraries to
68
simplify GPU-based accelerated processing. Python is one of the most popular
79
programming languages for science, engineering, data analytics, and deep
810
learning applications. The goal of CUDA Python is to unify
911
the Python ecosystem with a single set of interfaces that provide full coverage
1012
of and access to the CUDA host APIs from Python.
1113

12-
## Why CUDA Python?
14+
Why CUDA Python?
15+
----------------
1316

1417
CUDA Python provides uniform APIs and bindings for inclusion into existing
1518
toolkits and libraries to simplify GPU-based parallel processing for HPC, data
1619
science, and AI.
1720

18-
[Numba](https://numba.pydata.org/), a Python compiler from
19-
[Anaconda](https://www.anaconda.com/) that can compile Python code for execution
21+
`Numba <https://numba.pydata.org/>`_, a Python compiler from
22+
`Anaconda <https://www.anaconda.com/>`_ that can compile Python code for execution
2023
on CUDA-capable GPUs, provides Python developers with an easy entry into
2124
GPU-accelerated computing and a path for using increasingly sophisticated CUDA
2225
code with a minimum of new syntax and jargon. Numba has its own CUDA driver API
2326
bindings that can now be replaced with CUDA Python. With CUDA Python and Numba,
2427
you get the best of both worlds: rapid iterative development with Python and the
2528
speed of a compiled language targeting both CPUs and NVIDIA GPUs.
2629

27-
[CuPy](https://cupy.dev/) is a
28-
[NumPy](https://numpy.org/)/[SciPy](https://www.scipy.org/) compatible Array
29-
library, from [Preferred Networks](https://www.preferred.jp/en/), for
30+
`CuPy <https://cupy.dev/>`_ is a
31+
`NumPy <https://numpy.org/>`_/`SciPy <https://www.scipy.org/>`_ compatible Array
32+
library, from `Preferred Networks <https://www.preferred.jp/en/>`_, for
3033
GPU-accelerated computing with Python. CUDA Python simplifies the CuPy build
3134
and allows for a faster and smaller memory footprint when importing the CuPy
3235
Python module. In the future, when more CUDA Toolkit libraries are supported,

0 commit comments

Comments
 (0)