diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 427d35743..d6fa16684 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,6 +13,7 @@ Thank you for your interest in contributing to CUDA Python! Based on the type of - [`cuda.core`](https://nvidia.github.io/cuda-python/cuda-core/latest/contribute.html) - [`cuda.bindings`](https://nvidia.github.io/cuda-python/cuda-bindings/latest/contribute.html) +## Pre-commit This project uses [pre-commit.ci](https://pre-commit.ci/) with GitHub Actions. All pull requests are automatically checked for pre-commit compliance, and any pre-commit failures will block merging until resolved. To set yourself up for running pre-commit checks locally and to catch issues before pushing your changes, follow these steps: @@ -32,4 +33,8 @@ This sets up a git pre-commit hook so that all configured checks will run before **Note on workflow flexibility** Some contributors prefer to commit intermediate or work-in-progress changes that may not pass all pre-commit checks, and only clean up their commits before pushing (for example, by squashing and running `pre-commit run --all-files` manually at the end). If this fits your workflow, you may choose not to run `pre-commit install` and instead rely on manual checks. This approach avoids disruption during iterative development, while still ensuring code quality before code is shared or merged. -Choose the setup that best fits your workflow and development style. \ No newline at end of file +Choose the setup that best fits your workflow and development style. + +## Code signing + +This repository implements a security check to prevent the CI system from running untrusted code. A part of the security check consists of checking if the git commits are signed. Please ensure that your commits are signed [following GitHub’s instruction](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification). diff --git a/cuda_bindings/DESCRIPTION.rst b/cuda_bindings/DESCRIPTION.rst index 8a925f2dd..c4dc794cc 100644 --- a/cuda_bindings/DESCRIPTION.rst +++ b/cuda_bindings/DESCRIPTION.rst @@ -1,7 +1,14 @@ +.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + **************************************** -cuda.bindings: Low-level CUDA interfaces +cuda-bindings: Low-level CUDA interfaces **************************************** -`cuda.bindings` is a standard set of low-level interfaces, providing full coverage of and 1:1 access to the CUDA host APIs from Python. Checkout the `Overview `_ for the workflow and performance results. +`cuda.bindings `_ is a standard set of low-level interfaces, providing full coverage of and 1:1 access to the CUDA host APIs from Python. Checkout the `Overview `_ for the workflow and performance results. + +* `Repository `_ +* `Documentation `_ +* `Examples `_ +* `Issue tracker `_ For the installation instruction, please refer to the `Installation `_ page. diff --git a/cuda_bindings/README.md b/cuda_bindings/README.md index 47233f612..800de17f7 100644 --- a/cuda_bindings/README.md +++ b/cuda_bindings/README.md @@ -2,35 +2,13 @@ `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 page](https://nvidia.github.io/cuda-python/cuda-bindings/latest/overview.html) for the workflow and performance results. -`cuda.bindings` is a subpackage of `cuda-python`. - ## Installing Please refer to the [Installation page](https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html) for instructions and required/optional dependencies. ## Developing -We use `pre-commit` to manage various tools to help development and ensure consistency. -```shell -pip install pre-commit -``` - -### Code linting - -Run this command before checking in the code changes -```shell -pre-commit run -a --show-diff-on-failure -``` -to ensure the code formatting is in line of the requirements (as listed in [`pyproject.toml`](./pyproject.toml)). - -### Code signing - -This repository implements a security check to prevent the CI system from running untrusted code. A part of the -security check consists of checking if the git commits are signed. See -[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) -and -[here](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) -for more details, including how to sign your commits. +This subpackage adheres to the developing practices described in the parent metapackage [CONTRIBUTING.md](https://github.com/NVIDIA/cuda-python/blob/main/CONTRIBUTING.md). ## Testing diff --git a/cuda_core/DESCRIPTION.rst b/cuda_core/DESCRIPTION.rst index 73f0b9069..3ea961aa4 100644 --- a/cuda_core/DESCRIPTION.rst +++ b/cuda_core/DESCRIPTION.rst @@ -1,11 +1,10 @@ +.. SPDX-License-Identifier: Apache-2.0 + ******************************************************* cuda-core: Pythonic access to CUDA core functionalities ******************************************************* -`cuda.core `_ bridges Python's productivity -with CUDA's performance through intuitive and pythonic APIs. -The mission is to provide users full access to all of the core CUDA features in Python, -such as runtime control, compiler and linker. +`cuda.core `_ bridges Python's productivity with CUDA's performance through intuitive and pythonic APIs. The mission is to provide users full access to all of the core CUDA features in Python, such as runtime control, compiler and linker. * `Repository `_ * `Documentation `_ @@ -22,6 +21,4 @@ Installation pip install cuda-core[cu12] -Please refer to the `installation instructions -`_ for different -ways of installing `cuda.core`, including building from source. +Please refer to the `installation instructions `_ for different ways of installing `cuda.core`, including building from source. diff --git a/cuda_core/README.md b/cuda_core/README.md index 3743f8fae..5247aff02 100644 --- a/cuda_core/README.md +++ b/cuda_core/README.md @@ -4,37 +4,11 @@ Currently under active development; see [the documentation](https://nvidia.githu ## Installing -To build from source, just do: -```shell -$ git clone https://github.com/NVIDIA/cuda-python -$ cd cuda-python/cuda_core # move to the directory where this README locates -$ pip install . -``` -For now `cuda-python` is a required dependency. +Please refer to the [Installation page](https://nvidia.github.io/cuda-python/cuda-bindings/latest/install.html) for instructions and required/optional dependencies. ## Developing -We use `pre-commit` to manage various tools to help development and ensure consistency. -```shell -pip install pre-commit -``` - -### Code linting - -Run this command before checking in the code changes -```shell -pre-commit run -a --show-diff-on-failure -``` -to ensure the code formatting is in line of the requirements (as listed in [`pyproject.toml`](./pyproject.toml)). - -### Code signing - -This repository implements a security check to prevent the CI system from running untrusted code. A part of the -security check consists of checking if the git commits are signed. See -[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) -and -[here](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) -for more details, including how to sign your commits. +This subpackage adheres to the developing practices described in the parent metapackage [CONTRIBUTING.md](https://github.com/NVIDIA/cuda-python/blob/main/CONTRIBUTING.md). ## Testing diff --git a/cuda_python/DESCRIPTION.rst b/cuda_python/DESCRIPTION.rst new file mode 100644 index 000000000..d8d2e2237 --- /dev/null +++ b/cuda_python/DESCRIPTION.rst @@ -0,0 +1,48 @@ +.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + +************************************************************** +cuda-python: Metapackage collection of CUDA Python subpackages +************************************************************** + +CUDA Python is the home for accessing NVIDIA's CUDA platform from Python. It consists of multiple components: + +* `cuda.core `_: Pythonic access to CUDA Runtime and other core functionalities +* `cuda.bindings `_: Low-level Python bindings to CUDA C APIs +* `cuda.cooperative `_: A Python package providing CCCL's reusable block-wide and warp-wide *device* primitives for use within Numba CUDA kernels +* `cuda.parallel `_: A Python package for easy access to CCCL's highly efficient and customizable parallel algorithms, like `sort`, `scan`, `reduce`, `transform`, etc, that are callable on the *host* +* `numba.cuda `_: Numba's target for CUDA GPU programming by directly compiling a restricted subset of Python code into CUDA kernels and device functions following the CUDA execution model. + +For access to NVIDIA CPU & GPU Math Libraries, please refer to `nvmath-python `_. + +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 `_ documentation for installation guide and further detail. + +cuda-python as a metapackage +============================ + +`cuda-python` is now a metapackage that contains a collection of subpackages. Each subpackage is versioned independently, allowing installation of each component as needed. + +Subpackage: cuda.core +--------------------- + +The `cuda.core` package offers idiomatic, pythonic access to CUDA Runtime and other functionalities. + +The goals are to + +1. Provide **idiomatic ("pythonic")** access to CUDA Driver, Runtime, and JIT compiler toolchain +2. Focus on **developer productivity** by ensuring end-to-end CUDA development can be performed quickly and entirely in Python +3. **Avoid homegrown** Python abstractions for CUDA for new Python GPU libraries starting from scratch +4. **Ease** developer **burden of maintaining** and catching up with latest CUDA features +5. **Flatten the learning curve** for current and future generations of CUDA developers + +Subpackage: cuda.bindings +------------------------- + +The `cuda.bindings` package is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python. + +The list of available interfaces are: + +* CUDA Driver +* CUDA Runtime +* NVRTC +* nvJitLink +* NVVM diff --git a/cuda_python/pyproject.toml b/cuda_python/pyproject.toml index 652e90f0d..e6abc155b 100644 --- a/cuda_python/pyproject.toml +++ b/cuda_python/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" [project] name = "cuda-python" description = "CUDA Python: Performance meets Productivity" -readme = {file = "README.md", content-type = "text/markdown"} +readme = {file = "DESCRIPTION.rst", content-type = "text/x-rst"} authors = [{name = "NVIDIA Corporation", email = "cuda-python-conduct@nvidia.com"},] license = "LicenseRef-NVIDIA-SOFTWARE-LICENSE" classifiers = [