From 0a2ff318d2f38b60c5ebc2e5f7f0731dcadd056f Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 13 Dec 2024 05:46:28 +0000 Subject: [PATCH 1/5] add DESCRIPTION.rst and improve pyproject.toml --- cuda_core/DESCRIPTION.rst | 26 ++++++++++++++++++++++++++ cuda_core/README.md | 2 +- cuda_core/pyproject.toml | 10 ++++++++-- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 cuda_core/DESCRIPTION.rst diff --git a/cuda_core/DESCRIPTION.rst b/cuda_core/DESCRIPTION.rst new file mode 100644 index 0000000000..1088f40ba6 --- /dev/null +++ b/cuda_core/DESCRIPTION.rst @@ -0,0 +1,26 @@ +******************************************************* +cuda-core: Pythonic access to CUDA core functionalities +******************************************************* + +`cuda.core `_ bridges Python's productivity +with CUDA's performance through intuitive, pythonic APIs. +The mission is to provide users full access to all of the CUDA features in Python. + +* `Repository `_ +* `Documentation `_ +* `Examples `_ +* `Issue tracker `_ + +`cuda.core` is currently under active development. Any feedbacks or suggestions are welcomed! + + +Installation +============ + +.. code-block:: bash + + pip install cuda-core[cu12] + +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 6545eef770..f66d05e1b0 100644 --- a/cuda_core/README.md +++ b/cuda_core/README.md @@ -1,6 +1,6 @@ # `cuda.core`: (experimental) pythonic CUDA module -Currently under active developmen; see [the documentation](https://nvidia.github.io/cuda-python/cuda-core/latest/) for more details. +Currently under active development; see [the documentation](https://nvidia.github.io/cuda-python/cuda-core/latest/) for more details. ## Installing diff --git a/cuda_core/pyproject.toml b/cuda_core/pyproject.toml index 6993825f34..a9a7cbc419 100644 --- a/cuda_core/pyproject.toml +++ b/cuda_core/pyproject.toml @@ -20,7 +20,7 @@ authors = [ ] license = {text = "NVIDIA Software License"} classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: End Users/Desktop", @@ -36,6 +36,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Environment :: GPU :: NVIDIA CUDA", "Environment :: GPU :: NVIDIA CUDA :: 11", @@ -47,6 +48,11 @@ dependencies = [ "cuda-python <13", ] +[project.urls] +homepage = "https://nvidia.github.io/cuda-python/" +documentation = "https://nvidia.github.io/cuda-python/cuda-core/" +repository = "https://github.com/NVIDIA/cuda-python/tree/main/cuda_core" +issues = "https://github.com/NVIDIA/cuda-python/issues/" [tool.setuptools.packages.find] include = ["cuda.core*"] @@ -54,7 +60,7 @@ include = ["cuda.core*"] [tool.setuptools.dynamic] version = { attr = "cuda.core._version.__version__" } -readme = { file = ["README.md"], content-type = "text/markdown" } +readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" } [tool.ruff] line-length = 120 From 1def17ee563dbfa10aae6befaf1fbbe3b32b4f2a Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 13 Dec 2024 06:07:41 +0000 Subject: [PATCH 2/5] add twine check --- .github/actions/build/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index e1552ae838..86d70c27e5 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -44,6 +44,12 @@ runs: $CHOWN -R $(whoami) ${{ env.CUDA_CORE_ARTIFACTS_DIR }} ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }} + - name: Check cuda.core wheel + shell: bash --noprofile --norc -xeuo pipefail {0} + run: | + pip install twine + twine check ${{ env.CUDA_CORE_ARTIFACTS_DIR }}/*.whl + - name: Upload cuda.core build artifacts uses: actions/upload-artifact@v4 with: @@ -82,6 +88,11 @@ runs: $CHOWN -R $(whoami) ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }} ls -lahR ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }} + - name: Check cuda.bindings wheel + shell: bash --noprofile --norc -xeuo pipefail {0} + run: | + twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl + - name: Upload cuda.bindings build artifacts uses: actions/upload-artifact@v4 with: From 6b8ac660ef3a418d81708fa1f4e9be55cb2cd6b6 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 13 Dec 2024 14:14:00 +0000 Subject: [PATCH 3/5] disable twine check for cuda.bindings for now --- .github/actions/build/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 86d70c27e5..6b90dbd537 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -88,10 +88,11 @@ runs: $CHOWN -R $(whoami) ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }} ls -lahR ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }} - - name: Check cuda.bindings wheel - shell: bash --noprofile --norc -xeuo pipefail {0} - run: | - twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl + # TODO: enable this after NVIDIA/cuda-python#297 is resolved + # - name: Check cuda.bindings wheel + # shell: bash --noprofile --norc -xeuo pipefail {0} + # run: | + # twine check ${{ env.CUDA_BINDINGS_ARTIFACTS_DIR }}/*.whl - name: Upload cuda.bindings build artifacts uses: actions/upload-artifact@v4 From d8de14292a51d4de1f00856b0eb6a3919d489a2d Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 13 Dec 2024 14:20:27 +0000 Subject: [PATCH 4/5] make bindings optional deps --- cuda_core/DESCRIPTION.rst | 5 +++-- cuda_core/pyproject.toml | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cuda_core/DESCRIPTION.rst b/cuda_core/DESCRIPTION.rst index 1088f40ba6..73f0b9069a 100644 --- a/cuda_core/DESCRIPTION.rst +++ b/cuda_core/DESCRIPTION.rst @@ -3,8 +3,9 @@ cuda-core: Pythonic access to CUDA core functionalities ******************************************************* `cuda.core `_ bridges Python's productivity -with CUDA's performance through intuitive, pythonic APIs. -The mission is to provide users full access to all of the CUDA features in Python. +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 `_ diff --git a/cuda_core/pyproject.toml b/cuda_core/pyproject.toml index a9a7cbc419..6573d91186 100644 --- a/cuda_core/pyproject.toml +++ b/cuda_core/pyproject.toml @@ -44,10 +44,13 @@ classifiers = [ ] dependencies = [ "numpy", - # TODO: change this once cuda-bindings is packaged, see NVIDIA/cuda-python#105 - "cuda-python <13", ] +[project.optional-dependencies] +# TODO: change this once cuda-bindings is packaged, see NVIDIA/cuda-python#105 +cu11 = ["cuda-python==11.8.*"] +cu12 = ["cuda-python==12.*"] + [project.urls] homepage = "https://nvidia.github.io/cuda-python/" documentation = "https://nvidia.github.io/cuda-python/cuda-core/" @@ -57,7 +60,6 @@ issues = "https://github.com/NVIDIA/cuda-python/issues/" [tool.setuptools.packages.find] include = ["cuda.core*"] - [tool.setuptools.dynamic] version = { attr = "cuda.core._version.__version__" } readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" } From 538a0b113fafe020fc852741b3f467a9fe637a31 Mon Sep 17 00:00:00 2001 From: Leo Fang Date: Fri, 13 Dec 2024 14:37:12 +0000 Subject: [PATCH 5/5] add installation guide --- cuda_core/docs/source/install.md | 10 ++++++++++ cuda_core/docs/source/release/0.1.1-notes.md | 2 ++ 2 files changed, 12 insertions(+) diff --git a/cuda_core/docs/source/install.md b/cuda_core/docs/source/install.md index e13f37df2c..42b78b73a3 100644 --- a/cuda_core/docs/source/install.md +++ b/cuda_core/docs/source/install.md @@ -12,6 +12,16 @@ dependencies are as follows: [^1]: Including `cuda-python`. +## Installing from PyPI + +`cuda.core` works with `cuda.bindings` (part of `cuda-python`) 11 or 12. For example with CUDA 12: +```console +$ pip install cuda-core[cu12] +``` +and likewise use `[cu11]` for CUDA 11. + +Note that using `cuda.core` with NVRTC or nvJitLink installed from PyPI via `pip install` is currently +not supported. This will be fixed in a future release. ## Installing from Source diff --git a/cuda_core/docs/source/release/0.1.1-notes.md b/cuda_core/docs/source/release/0.1.1-notes.md index deb3fb0fa4..56cdc161aa 100644 --- a/cuda_core/docs/source/release/0.1.1-notes.md +++ b/cuda_core/docs/source/release/0.1.1-notes.md @@ -17,6 +17,8 @@ Released on Dec XX, 2024 - All APIs are currently *experimental* and subject to change without deprecation notice. Please kindly share your feedbacks with us so that we can make `cuda.core` better! +- Using `cuda.core` with NVRTC or nvJitLink installed from PyPI via `pip install` is currently + not supported. This will be fixed in a future release. - Some `LinkerOptions` are only available when using a modern version of CUDA. When using CUDA <12, the backend is the cuLink api which supports only a subset of the options that nvjitlink does. Further, some options aren't available on CUDA versions <12.6