Skip to content

Commit bf712bf

Browse files
authored
Merge branch 'main' into cythonize_more
2 parents fae5e7f + b09d7ed commit bf712bf

File tree

7 files changed

+33
-6
lines changed

7 files changed

+33
-6
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ repos:
3333
- id: no-markdown-in-docs-source
3434
name: Prevent markdown files in docs/source directories
3535
entry: bash -c
36-
args: ['if find . -path "*/docs/source/*.md" -not -path "./docs/README.md" | grep -q .; then echo "ERROR: Markdown files found in docs/source/ directories. Use reST (.rst) instead."; exit 1; fi']
36+
args:
37+
- 'for file in "$@"; do >&2 echo "error: markdown file "$file" found in a docs/source directory. Only reST (.rst) is allowed"; done && exit 1'
38+
- "_" # fake script name, because bash considers $0 (the first argument) to be the script name
3739
language: system
38-
pass_filenames: false
39-
always_run: true
40+
files: '^.*/docs/source/.*\.md$'
4041

4142
# Standard hooks
4243
- repo: https://github.com/pre-commit/pre-commit-hooks
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33

4-
__version__ = "13.0.1"
4+
__version__ = "13.0.2"

cuda_bindings/docs/source/release/12.9.X-notes.rst renamed to cuda_bindings/docs/source/release/12.9.3-notes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Highlights
1616
* The Python overhead of calling functions in CUDA bindings in ``driver``, ``runtime`` and ``nvrtc`` has been reduced by approximately 30%.
1717
* Updated the ``cuda.bindings.runtime`` module to statically link against the CUDA Runtime library from CUDA Toolkit 12.9.1.
1818
* ``cyruntime.getLocalRuntimeVersion`` now uses pathfinder to find the CUDA runtime.
19-
19+
* Experimental free-threaded builds are available on PyPI. More details are available in our :ref:`support` docs.
2020

2121
Known issues
2222
------------

cuda_bindings/docs/source/release/13.X.Y-notes.rst renamed to cuda_bindings/docs/source/release/13.0.2-notes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Highlights
1919
* On Windows, the ``pywin32`` dependency has been removed. The necessary Windows API functions are now accessed directly.
2020
* Updated the ``cuda.bindings.runtime`` module to statically link against the CUDA Runtime library from CUDA Toolkit 13.0.1.
2121
* ``cyruntime.getLocalRuntimeVersion`` now uses pathfinder to find the CUDA runtime.
22+
* Experimental free-threaded builds are available on PyPI. More details are available in our :ref:`support` docs.
2223

2324

2425
Bug fixes

cuda_bindings/docs/source/support.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33
4+
.. _support:
5+
46
``cuda.bindings`` Support Policy
57
================================
68

@@ -23,9 +25,20 @@ The ``cuda.bindings`` module has the following support policy:
2325
module could require Cython layer users to rebuild their projects and update their pinning to
2426
this module.
2527

28+
Free-threading Build Support
29+
----------------------------
30+
As of cuda-bindings 13.0.2/12.9.3, wheels for the `free-threaded interpreter`_ are shipped to PyPI.
31+
32+
1. Support for these builds is best effort, due to heavy use of `built-in
33+
modules that are known to be thread-unsafe`_, such as ``ctypes``.
34+
2. For now, you are responsible for making sure that calls into ``cuda-bindings``
35+
libraries are thread-safe. This is subject to change.
36+
2637
The NVIDIA CUDA Python team reserves rights to amend the above support policy. Any major changes,
2738
however, will be announced to the users in advance.
2839

2940

3041
.. _CUDA minor version compatibility: https://docs.nvidia.com/deploy/cuda-compatibility/#minor-version-compatibility
3142
.. _CPython EOL schedule: https://devguide.python.org/versions/
43+
.. _built-in modules that are known to be thread-unsafe: https://github.com/python/cpython/issues/116738
44+
.. _free-threaded interpreter: https://docs.python.org/3/howto/free-threading-python.html

cuda_core/build_hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _get_proper_cuda_bindings_major_version() -> str:
4545
m = re.search(r"CUDA Version:\s*([\d\.]+)", out.stdout.decode())
4646
if m:
4747
return m.group(1).split(".")[0]
48-
except FileNotFoundError:
48+
except (FileNotFoundError, subprocess.CalledProcessError):
4949
# the build machine has no driver installed
5050
pass
5151

cuda_core/docs/source/install.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ and likewise use ``[cu13]`` for CUDA 13.
4242
Note that using ``cuda.core`` with NVRTC installed from PyPI via ``pip install`` requires
4343
``cuda.bindings`` 12.8.0+. Likewise, with nvJitLink it requires 12.8.0+.
4444

45+
Free-threading Build Support
46+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47+
As of cuda-core 0.4.0, wheels for the `free-threaded interpreter`_ are shipped to PyPI.
48+
49+
1. Support for these builds is best effort, due to heavy use of `built-in
50+
modules that are known to be thread-unsafe`_, such as ``ctypes``.
51+
2. For now, you are responsible for making sure that calls into ``cuda-core``
52+
libraries are thread-safe. This is subject to change.
53+
54+
.. _built-in modules that are known to be thread-unsafe: https://github.com/python/cpython/issues/116738
55+
.. _free-threaded interpreter: https://docs.python.org/3/howto/free-threading-python.html
56+
4557
Installing from Conda (conda-forge)
4658
-----------------------------------
4759

0 commit comments

Comments
 (0)