From d793d463f90d8b2a85ade8b6ebc101804f792a9f Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:14:17 -0400 Subject: [PATCH 1/7] docs: add FT build notes --- cuda_bindings/docs/source/support.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index f028361173..9cf2f75e45 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -23,9 +23,20 @@ The ``cuda.bindings`` module has the following support policy: module could require Cython layer users to rebuild their projects and update their pinning to this module. +Free-threading build Support +---------------------------- +As of $RELEASE, cuda-python ships with wheels that support the `free-threaded interpreter`_. + +1. Support for these builds is best effort, due to heavy use of `built-in + modules that are known to be thread-unsafe`_, such as ``ctypes``. +2. For now, you are responsible for making sure that calls into ``cuda-python`` + libraries are thread-safe. This is subject to change. + The NVIDIA CUDA Python team reserves rights to amend the above support policy. Any major changes, however, will be announced to the users in advance. .. _CUDA minor version compatibility: https://docs.nvidia.com/deploy/cuda-compatibility/#minor-version-compatibility .. _CPython EOL schedule: https://devguide.python.org/versions/ +.. _built-in modules that are known to be thread-unsafe: https://github.com/python/cpython/issues/116738 +.. _free-threaded interpreter: https://docs.python.org/3/howto/free-threading-python.html From 98124eeb2912d7d6767fd46573575296d07ae59a Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 2 Oct 2025 18:27:38 -0400 Subject: [PATCH 2/7] docs: release notes with links to support section --- cuda_bindings/docs/source/release/12.9.X-notes.rst | 2 +- cuda_bindings/docs/source/release/13.X.Y-notes.rst | 1 + cuda_bindings/docs/source/support.rst | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cuda_bindings/docs/source/release/12.9.X-notes.rst b/cuda_bindings/docs/source/release/12.9.X-notes.rst index 7a4713a89b..52a73b37a4 100644 --- a/cuda_bindings/docs/source/release/12.9.X-notes.rst +++ b/cuda_bindings/docs/source/release/12.9.X-notes.rst @@ -16,7 +16,7 @@ Highlights * The Python overhead of calling functions in CUDA bindings in ``driver``, ``runtime`` and ``nvrtc`` has been reduced by approximately 30%. * Updated the ``cuda.bindings.runtime`` module to statically link against the CUDA Runtime library from CUDA Toolkit 12.9.1. * ``cyruntime.getLocalRuntimeVersion`` now uses pathfinder to find the CUDA runtime. - +* Experimental free-threaded builds are available on PyPI. More details are available in our :ref:`support` docs. Known issues ------------ diff --git a/cuda_bindings/docs/source/release/13.X.Y-notes.rst b/cuda_bindings/docs/source/release/13.X.Y-notes.rst index 35e40c4be6..9808682b41 100644 --- a/cuda_bindings/docs/source/release/13.X.Y-notes.rst +++ b/cuda_bindings/docs/source/release/13.X.Y-notes.rst @@ -19,6 +19,7 @@ Highlights * On Windows, the ``pywin32`` dependency has been removed. The necessary Windows API functions are now accessed directly. * Updated the ``cuda.bindings.runtime`` module to statically link against the CUDA Runtime library from CUDA Toolkit 13.0.1. * ``cyruntime.getLocalRuntimeVersion`` now uses pathfinder to find the CUDA runtime. +* Experimental free-threaded builds are available on PyPI. More details are available in our :ref:`support` docs. Bug fixes diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index 9cf2f75e45..bcebd2eab5 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -1,6 +1,8 @@ .. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE +.. _support: + ``cuda.bindings`` Support Policy ================================ @@ -25,7 +27,7 @@ The ``cuda.bindings`` module has the following support policy: Free-threading build Support ---------------------------- -As of $RELEASE, cuda-python ships with wheels that support the `free-threaded interpreter`_. +As of cuda-python 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ are shipped to PyPI. 1. Support for these builds is best effort, due to heavy use of `built-in modules that are known to be thread-unsafe`_, such as ``ctypes``. From 58622dd8f320296dae3eca5cf221f35edae0a7fc Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:13:22 -0400 Subject: [PATCH 3/7] Update cuda_bindings/docs/source/support.rst Co-authored-by: Ralf W. Grosse-Kunstleve --- cuda_bindings/docs/source/support.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index bcebd2eab5..20f33a269f 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -25,7 +25,7 @@ The ``cuda.bindings`` module has the following support policy: module could require Cython layer users to rebuild their projects and update their pinning to this module. -Free-threading build Support +Free-threading Build Support ---------------------------- As of cuda-python 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ are shipped to PyPI. From aa097cfe0f9050e6096abf1d453035f4186f0d5d Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:13:33 -0400 Subject: [PATCH 4/7] Update cuda_bindings/docs/source/support.rst Co-authored-by: Leo Fang --- cuda_bindings/docs/source/support.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index 20f33a269f..cc0e5a32de 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -27,7 +27,7 @@ The ``cuda.bindings`` module has the following support policy: Free-threading Build Support ---------------------------- -As of cuda-python 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ are shipped to PyPI. +As of cuda-bindings 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ are shipped to PyPI. 1. Support for these builds is best effort, due to heavy use of `built-in modules that are known to be thread-unsafe`_, such as ``ctypes``. From ef0498be1867872b49befb121f4fe92a26359832 Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:13:40 -0400 Subject: [PATCH 5/7] Update cuda_bindings/docs/source/support.rst Co-authored-by: Leo Fang --- cuda_bindings/docs/source/support.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cuda_bindings/docs/source/support.rst b/cuda_bindings/docs/source/support.rst index cc0e5a32de..a34a5c49e2 100644 --- a/cuda_bindings/docs/source/support.rst +++ b/cuda_bindings/docs/source/support.rst @@ -31,7 +31,7 @@ As of cuda-bindings 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ a 1. Support for these builds is best effort, due to heavy use of `built-in modules that are known to be thread-unsafe`_, such as ``ctypes``. -2. For now, you are responsible for making sure that calls into ``cuda-python`` +2. For now, you are responsible for making sure that calls into ``cuda-bindings`` libraries are thread-safe. This is subject to change. The NVIDIA CUDA Python team reserves rights to amend the above support policy. Any major changes, From db957d10ed44dc6536720d0fdff6353676118b4a Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 3 Oct 2025 10:15:41 -0400 Subject: [PATCH 6/7] chore(version): morphize the docs and bump `__version__` --- cuda_bindings/cuda/bindings/_version.py | 2 +- .../docs/source/release/{12.9.X-notes.rst => 12.9.3-notes.rst} | 0 .../docs/source/release/{13.X.Y-notes.rst => 13.0.2-notes.rst} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename cuda_bindings/docs/source/release/{12.9.X-notes.rst => 12.9.3-notes.rst} (100%) rename cuda_bindings/docs/source/release/{13.X.Y-notes.rst => 13.0.2-notes.rst} (100%) diff --git a/cuda_bindings/cuda/bindings/_version.py b/cuda_bindings/cuda/bindings/_version.py index 00adf6d46e..84ffc67e51 100644 --- a/cuda_bindings/cuda/bindings/_version.py +++ b/cuda_bindings/cuda/bindings/_version.py @@ -1,4 +1,4 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -__version__ = "13.0.1" +__version__ = "13.0.2" diff --git a/cuda_bindings/docs/source/release/12.9.X-notes.rst b/cuda_bindings/docs/source/release/12.9.3-notes.rst similarity index 100% rename from cuda_bindings/docs/source/release/12.9.X-notes.rst rename to cuda_bindings/docs/source/release/12.9.3-notes.rst diff --git a/cuda_bindings/docs/source/release/13.X.Y-notes.rst b/cuda_bindings/docs/source/release/13.0.2-notes.rst similarity index 100% rename from cuda_bindings/docs/source/release/13.X.Y-notes.rst rename to cuda_bindings/docs/source/release/13.0.2-notes.rst From 355638af0f7a1c65b546168ceadc71294a322e5a Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:00:16 -0400 Subject: [PATCH 7/7] docs: add cuda-core FT docs --- cuda_core/docs/source/install.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cuda_core/docs/source/install.rst b/cuda_core/docs/source/install.rst index e864b042f9..68ee4176df 100644 --- a/cuda_core/docs/source/install.rst +++ b/cuda_core/docs/source/install.rst @@ -42,6 +42,18 @@ and likewise use ``[cu13]`` for CUDA 13. Note that using ``cuda.core`` with NVRTC installed from PyPI via ``pip install`` requires ``cuda.bindings`` 12.8.0+. Likewise, with nvJitLink it requires 12.8.0+. +Free-threading Build Support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +As of cuda-core 0.4.0, wheels for the `free-threaded interpreter`_ are shipped to PyPI. + +1. Support for these builds is best effort, due to heavy use of `built-in + modules that are known to be thread-unsafe`_, such as ``ctypes``. +2. For now, you are responsible for making sure that calls into ``cuda-core`` + libraries are thread-safe. This is subject to change. + +.. _built-in modules that are known to be thread-unsafe: https://github.com/python/cpython/issues/116738 +.. _free-threaded interpreter: https://docs.python.org/3/howto/free-threading-python.html + Installing from Conda (conda-forge) -----------------------------------