Skip to content

Commit 30d65ed

Browse files
committed
re-run pre-commit; update docs to reflect recent changes
1 parent 93b495f commit 30d65ed

File tree

5 files changed

+71
-13
lines changed

5 files changed

+71
-13
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CUDA-Python
1+
# cuda-python
22

33
CUDA Python is the home for accessing NVIDIA’s CUDA platform from Python. It consists of multiple components:
44

@@ -7,21 +7,21 @@ CUDA Python is the home for accessing NVIDIA’s CUDA platform from Python. It c
77
* [cuda.cooperative](https://nvidia.github.io/cccl/cuda_cooperative/): Pythonic exposure of CUB cooperative algorithms
88
* [cuda.parallel](https://nvidia.github.io/cccl/cuda_parallel/): Pythonic exposure of Thrust parallel algorithms
99

10-
For access to NVIDIA Math Libraries, please refer to [nvmath-python](https://docs.nvidia.com/cuda/nvmath-python/latest).
10+
For access to NVIDIA CPU & GPU Math Libraries, please refer to [nvmath-python](https://docs.nvidia.com/cuda/nvmath-python/latest).
1111

1212
CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. All of the previously available functionalities from the cuda-python package will continue to be available, please refer to the [cuda.bindings](https://nvidia.github.io/cuda-python/cuda-bindings/latest) documentation for installation guide and further detail.
1313

14-
## CUDA-Python as a metapackage
14+
## cuda-python as a metapackage
1515

16-
CUDA-Python is structured to become a metapackage that contains a collection of subpackages. Each subpackage is versioned independently, allowing installation of each component as needed.
16+
`cuda-python` is being re-structured to become a metapackage that contains a collection of subpackages. Each subpackage is versioned independently, allowing installation of each component as needed.
1717

1818
### Subpackage: `cuda.core`
1919

2020
The `cuda.core` package offers idiomatic, pythonic access to CUDA Runtime and other functionalities.
2121

2222
The goals are to
2323

24-
1. Provide **idiomatic (pythonic)** access to CUDA Driver/Runtime
24+
1. Provide **idiomatic ("pythonic")** access to CUDA Driver, Runtime, and JIT compiler toolchain
2525
2. Focus on **developer productivity** by ensuring end-to-end CUDA development can be performed quickly and entirely in Python
2626
3. **Avoid homegrown** Python abstractions for CUDA for new Python GPU libraries starting from scratch
2727
4. **Ease** developer **burden of maintaining** and catching up with latest CUDA features

cuda_bindings/README.md

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# `cuda.bindings`: Low-level CUDA interfaces
22

3-
CUDA Python is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the [Overview](https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html) for the workflow and performance results.
3+
`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. Checkout the [Overview](https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html) for the workflow and performance results.
4+
5+
`cuda.bindings` is a subpackage of `cuda-python`.
46

57
## Installing
68

79
CUDA Python can be installed from:
810

9-
* PYPI
10-
* Conda (nvidia channel)
11+
* PyPI
12+
* Conda (conda-forge/nvidia channels)
1113
* Source builds
1214

1315
Differences between these options are described in [Installation](https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html) documentation. Each package guarantees minor version compatibility.
@@ -31,6 +33,30 @@ Source builds work for multiple Python versions, however pre-build PyPI and Cond
3133

3234
* Python 3.9 to 3.12
3335

36+
## Developing
37+
38+
We use `pre-commit` to manage various tools to help development and ensure consistency.
39+
```shell
40+
pip install pre-commit
41+
```
42+
43+
### Code linting
44+
45+
Run this command before checking in the code changes
46+
```shell
47+
pre-commit run -a --show-diff-on-failure
48+
```
49+
to ensure the code formatting is in line of the requirements (as listed in [`pyproject.toml`](./pyproject.toml)).
50+
51+
### Code signing
52+
53+
This repository implements a security check to prevent the CI system from running untrusted code. A part of the
54+
security check consists of checking if the git commits are signed. See
55+
[here](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/faqs/#why-did-i-receive-a-comment-that-my-pull-request-requires-additional-validation)
56+
and
57+
[here](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
58+
for more details, including how to sign your commits.
59+
3460
## Testing
3561

3662
Latest dependencies can be found in [requirements.txt](https://github.com/NVIDIA/cuda-python/blob/main/cuda_bindings/requirements.txt).

cuda_core/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,43 @@
11
# `cuda.core`: (experimental) pythonic CUDA module
22

3-
Currently under active development. To build from source, just do:
3+
Currently under active developmen; see [the documentation](https://nvidia.github.io/cuda-python/cuda-core/latest/) for more details.
4+
5+
## Installing
6+
7+
TO build from source, just do:
48
```shell
59
$ git clone https://github.com/NVIDIA/cuda-python
610
$ cd cuda-python/cuda_core # move to the directory where this README locates
711
$ pip install .
812
```
913
For now `cuda-python` is a required dependency.
14+
15+
## Developing
16+
17+
We use `pre-commit` to manage various tools to help development and ensure consistency.
18+
```shell
19+
pip install pre-commit
20+
```
21+
22+
### Code linting
23+
24+
Run this command before checking in the code changes
25+
```shell
26+
pre-commit run -a --show-diff-on-failure
27+
```
28+
to ensure the code formatting is in line of the requirements (as listed in [`pyproject.toml`](./pyproject.toml)).
29+
30+
### Code signing
31+
32+
This repository implements a security check to prevent the CI system from running untrusted code. A part of the
33+
security check consists of checking if the git commits are signed. See
34+
[here](https://docs.gha-runners.nvidia.com/apps/copy-pr-bot/faqs/#why-did-i-receive-a-comment-that-my-pull-request-requires-additional-validation)
35+
and
36+
[here](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
37+
for more details, including how to sign your commits.
38+
39+
## Testing
40+
41+
To run these tests:
42+
* `python -m pytest tests/` against local builds
43+
* `pytest tests/` against installed packages

cuda_core/cuda/core/experimental/_stream.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ def wait(self, event_or_stream: Union[Event, Stream]):
211211
try:
212212
stream = Stream._init(event_or_stream)
213213
except Exception as e:
214-
raise ValueError(
215-
"only an Event, Stream, or object supporting __cuda_stream__ can be waited"
216-
) from e
214+
raise ValueError("only an Event, Stream, or object supporting __cuda_stream__ can be waited") from e
217215
else:
218216
stream = event_or_stream
219217
event = handle_return(cuda.cuEventCreate(cuda.CUevent_flags.CU_EVENT_DISABLE_TIMING))

cuda_python/docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ multiple components:
99
- `cuda.cooperative`_: Pythonic exposure of CUB cooperative algorithms
1010
- `cuda.parallel`_: Pythonic exposure of Thrust parallel algorithms
1111

12-
For access to NVIDIA Math Libraries, please refer to `nvmath-python`_.
12+
For access to NVIDIA CPU & GPU Math Libraries, please refer to `nvmath-python`_.
1313

1414
.. _nvmath-python: https://docs.nvidia.com/cuda/nvmath-python/latest
1515

0 commit comments

Comments
 (0)