From 3eaa044b4d9c358d1589973e1f6bba4276d5d65a Mon Sep 17 00:00:00 2001 From: Vladislav Zhurba Date: Mon, 28 Apr 2025 14:36:10 -0700 Subject: [PATCH 1/3] Consolidate shared info between README.md and DESCRIPTION.rst --- CONTRIBUTING.md | 9 +++++++ cuda_bindings/DESCRIPTION.rst | 9 +++++-- cuda_bindings/README.md | 24 +----------------- cuda_core/DESCRIPTION.rst | 9 ++----- cuda_core/README.md | 30 ++--------------------- cuda_python/DESCRIPTION.rst | 46 +++++++++++++++++++++++++++++++++++ cuda_python/pyproject.toml | 2 +- 7 files changed, 68 insertions(+), 61 deletions(-) create mode 100644 cuda_python/DESCRIPTION.rst diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index beea6c63a..ee946463a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,3 +12,12 @@ Thank you for your interest in contributing to CUDA Python! Based on the type of - Please refer to each component's guideline: - [`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) + +## 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. diff --git a/cuda_bindings/DESCRIPTION.rst b/cuda_bindings/DESCRIPTION.rst index 8a925f2dd..678b2e478 100644 --- a/cuda_bindings/DESCRIPTION.rst +++ b/cuda_bindings/DESCRIPTION.rst @@ -1,7 +1,12 @@ **************************************** -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..322353d3a 100644 --- a/cuda_core/DESCRIPTION.rst +++ b/cuda_core/DESCRIPTION.rst @@ -2,10 +2,7 @@ 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 +19,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..b821054ea --- /dev/null +++ b/cuda_python/DESCRIPTION.rst @@ -0,0 +1,46 @@ +************************************************************** +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 = [ From 61830a9c7459b466aa226706782b41c86a5183d4 Mon Sep 17 00:00:00 2001 From: Vladislav Zhurba Date: Tue, 29 Apr 2025 13:03:44 -0700 Subject: [PATCH 2/3] Add SPDX for DESCRIPTION.rst files --- cuda_bindings/DESCRIPTION.rst | 2 ++ cuda_core/DESCRIPTION.rst | 2 ++ cuda_python/DESCRIPTION.rst | 2 ++ 3 files changed, 6 insertions(+) diff --git a/cuda_bindings/DESCRIPTION.rst b/cuda_bindings/DESCRIPTION.rst index 678b2e478..c4dc794cc 100644 --- a/cuda_bindings/DESCRIPTION.rst +++ b/cuda_bindings/DESCRIPTION.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + **************************************** cuda-bindings: Low-level CUDA interfaces **************************************** diff --git a/cuda_core/DESCRIPTION.rst b/cuda_core/DESCRIPTION.rst index 322353d3a..3ea961aa4 100644 --- a/cuda_core/DESCRIPTION.rst +++ b/cuda_core/DESCRIPTION.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: Apache-2.0 + ******************************************************* cuda-core: Pythonic access to CUDA core functionalities ******************************************************* diff --git a/cuda_python/DESCRIPTION.rst b/cuda_python/DESCRIPTION.rst index b821054ea..d8d2e2237 100644 --- a/cuda_python/DESCRIPTION.rst +++ b/cuda_python/DESCRIPTION.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE + ************************************************************** cuda-python: Metapackage collection of CUDA Python subpackages ************************************************************** From c3eae5cee303d08f43070cf787312b28e3b704d5 Mon Sep 17 00:00:00 2001 From: Vladislav Zhurba Date: Tue, 29 Apr 2025 13:03:59 -0700 Subject: [PATCH 3/3] Unify code signing description Unified between: - CONTRIBUTING.md - https://nvidia.github.io/cuda-python/cuda-core/latest/contribute.html --- CONTRIBUTING.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e5bb4f62..d6fa16684 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,9 +37,4 @@ 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. 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 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).