Skip to content

Commit ae950f8

Browse files
authored
Merge branch 'main' into pathfinder/cuquantum
2 parents a5c5102 + f907e46 commit ae950f8

17 files changed

Lines changed: 104 additions & 109 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
.. SPDX-License-Identifier: Apache-2.0
3+
4+
.. module:: cuda.bindings
5+
6+
``cuda-bindings`` 13.4.0 Release notes
7+
======================================
8+
9+
Deprecation Notices
10+
-------------------
11+
12+
* Support for using ``cuda-bindings`` with Python 3.10 is deprecated and will be
13+
removed in a future version. Python 3.10 reaches end of life in October 2026
14+
per the `CPython support cycle <https://devguide.python.org/versions/>`_.
15+
16+
Known issues
17+
------------
18+
19+
* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``.
20+
* ``nvml.system_get_process_name`` on WSL can return incorrect values. To work around this, set the locale to "C" before calling ``nvml.device_get_compute_running_processes_v3`` (which sets the process names) and before calling ``nvml.system_get_process_name``. ``cuda_core`` does this automatically, but users of the raw NVML API will need to do this manually.

‎cuda_core/cuda/core/_linker.pyi‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ class LinkerOptions:
112112
113113
Since the linker may choose to use nvJitLink or the driver APIs as the linking backend,
114114
not all options are applicable. When the system's installed nvJitLink is too old (<12.3),
115-
not installed, or older than the CUDA driver major version, the driver APIs (cuLink)
116-
will be used instead.
115+
or not installed, the driver APIs (cuLink) will be used instead.
117116
118117
Attributes
119118
----------

‎cuda_core/cuda/core/_linker.pyx‎

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ from cuda.core._utils.cuda_utils import (
3939
driver,
4040
is_sequence,
4141
)
42-
from cuda.core._utils.version import driver_version
4342
from cuda.core.typing import CompilerBackendType, ObjectCodeFormatType
4443

4544
if TYPE_CHECKING:
@@ -218,8 +217,7 @@ class LinkerOptions:
218217

219218
Since the linker may choose to use nvJitLink or the driver APIs as the linking backend,
220219
not all options are applicable. When the system's installed nvJitLink is too old (<12.3),
221-
not installed, or older than the CUDA driver major version, the driver APIs (cuLink)
222-
will be used instead.
220+
or not installed, the driver APIs (cuLink) will be used instead.
223221

224222
Attributes
225223
----------
@@ -696,22 +694,12 @@ def _decide_nvjitlink_or_driver() -> bool:
696694
from cuda.bindings._internal import nvjitlink
697695

698696
if _nvjitlink_has_version_symbol(nvjitlink):
699-
nvjitlink_version = nvjitlink_module.version()
700-
driver_major = driver_version()[0]
701-
if driver_major <= nvjitlink_version[0]:
702-
_use_nvjitlink_backend = True
703-
return False # Use nvjitlink
704-
705-
warn_txt = (
706-
f"CUDA driver major version {driver_major} is newer than "
707-
f"nvJitLink major version {nvjitlink_version[0]}; therefore "
708-
f"{warn_txt_common} nvJitLink."
709-
)
710-
else:
711-
warn_txt = (
712-
f"{'nvJitLink*.dll' if sys.platform == 'win32' else 'libnvJitLink.so*'} is too old (<12.3)."
713-
f" Therefore cuda.bindings.nvjitlink is not usable and {warn_txt_common} nvJitLink."
714-
)
697+
_use_nvjitlink_backend = True
698+
return False # Use nvjitlink
699+
warn_txt = (
700+
f"{'nvJitLink*.dll' if sys.platform == 'win32' else 'libnvJitLink.so*'} is too old (<12.3)."
701+
f" Therefore cuda.bindings.nvjitlink is not usable and {warn_txt_common} nvJitLink."
702+
)
715703

716704
warn(warn_txt, stacklevel=2, category=RuntimeWarning)
717705
_use_nvjitlink_backend = False
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
.. SPDX-License-Identifier: Apache-2.0
3+
4+
.. currentmodule:: cuda.core
5+
6+
``cuda.core`` 1.2.0 Release Notes
7+
==================================
8+
9+
Deprecation Notices
10+
-------------------
11+
12+
* Support for using ``cuda-core`` with Python 3.10 is deprecated and will be
13+
removed in a future version. Python 3.10 reaches end of life in October 2026
14+
per the `CPython support cycle <https://devguide.python.org/versions/>`_.

‎cuda_core/examples/graph_update.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# ################################################################################
1111

1212
# /// script
13-
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "numpy>=2.1"]
13+
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "numpy>=2.2.5"]
1414
# ///
1515

1616
import sys
@@ -44,8 +44,11 @@ def build_increment_graph(device, kernel, target_ptr):
4444

4545

4646
def main():
47-
if np.lib.NumpyVersion(np.__version__) < "2.1.0":
48-
print("This example requires NumPy 2.1.0 or later", file=sys.stderr)
47+
# Writing into the pinned host array imported via DLPack requires NumPy
48+
# 2.2.5+ (np.from_dlpack returns a read-only array on earlier versions;
49+
# see numpy GH #28632).
50+
if np.lib.NumpyVersion(np.__version__) < "2.2.5":
51+
print("This example requires NumPy 2.2.5 or later", file=sys.stderr)
4952
sys.exit(1)
5053

5154
device = Device()

‎cuda_core/examples/memory_ops.py‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
# ################################################################################
66
#
77
# This example demonstrates memory resources for allocation and management,
8-
# copying data between device and pinned memory, and DLPack interop. Requires
9-
# NumPy 2.1.0+.
8+
# copying data between device and pinned memory, and DLPack interop. Writing
9+
# into the pinned host array imported via DLPack requires NumPy 2.2.5+ (arrays
10+
# from np.from_dlpack are read-only on earlier versions; see numpy GH #28632).
1011
#
1112
# ################################################################################
1213

1314
# /// script
14-
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "cupy-cuda13x"]
15+
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "cupy-cuda13x", "numpy>=2.2.5"]
1516
# ///
1617

1718
import sys
@@ -47,8 +48,8 @@
4748

4849

4950
def main():
50-
if np.__version__ < "2.1.0":
51-
print("This example requires NumPy 2.1.0 or later", file=sys.stderr)
51+
if np.lib.NumpyVersion(np.__version__) < "2.2.5":
52+
print("This example requires NumPy 2.2.5 or later", file=sys.stderr)
5253
sys.exit(1)
5354

5455
dev = Device()

‎cuda_core/examples/memory_pool_resources.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# ################################################################################
1212

1313
# /// script
14-
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "numpy>=2.1"]
14+
# dependencies = ["cuda_bindings", "cuda_core", "nvidia-cuda-nvrtc", "numpy>=2.2.5"]
1515
# ///
1616

1717
import sys
@@ -43,8 +43,11 @@
4343

4444

4545
def main():
46-
if np.lib.NumpyVersion(np.__version__) < "2.1.0":
47-
print("This example requires NumPy 2.1.0 or later", file=sys.stderr)
46+
# Writing into the managed/pinned host arrays imported via DLPack requires
47+
# NumPy 2.2.5+ (np.from_dlpack returns a read-only array on earlier
48+
# versions; see numpy GH #28632).
49+
if np.lib.NumpyVersion(np.__version__) < "2.2.5":
50+
print("This example requires NumPy 2.2.5 or later", file=sys.stderr)
4851
sys.exit(1)
4952

5053
device = Device()

‎cuda_core/tests/graph/test_device_launch.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def _compile_device_launcher_kernel():
7676
Device().compute_capability.major < 9,
7777
reason="Device-side graph launch requires Hopper (sm_90+) architecture",
7878
)
79-
@requires_module(np, "2.1")
79+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
8080
def test_device_launch_basic(init_cuda):
8181
"""Test basic device-side graph launch functionality.
8282
@@ -128,7 +128,7 @@ def test_device_launch_basic(init_cuda):
128128
Device().compute_capability.major < 9,
129129
reason="Device-side graph launch requires Hopper (sm_90+) architecture",
130130
)
131-
@requires_module(np, "2.1")
131+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
132132
def test_device_launch_multiple(init_cuda):
133133
"""Test that device-side graph launch can be executed multiple times.
134134

‎cuda_core/tests/graph/test_graph_builder.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def test_graph_is_join_required(init_cuda):
121121
gb.end_building().complete()
122122

123123

124-
@requires_module(np, "2.1")
124+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
125125
def test_graph_repeat_capture(init_cuda):
126126
mod = compile_common_kernels()
127127
add_one = mod.get_kernel("add_one")
@@ -341,7 +341,7 @@ def read_byte(data):
341341
assert result[0] == 0xAB
342342

343343

344-
@pytest.mark.skipif(tuple(int(i) for i in np.__version__.split(".")[:2]) < (2, 1), reason="need numpy 2.1.0+")
344+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
345345
def test_graph_child_graph(init_cuda):
346346
mod = compile_common_kernels()
347347
add_one = mod.get_kernel("add_one")

‎cuda_core/tests/graph/test_graph_builder_conditional.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@pytest.mark.parametrize(
1818
"condition_value", [True, False, ctypes.c_bool(True), ctypes.c_bool(False), np.bool_(True), np.bool_(False), 1, 0]
1919
)
20-
@requires_module(np, "2.1")
20+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
2121
def test_graph_conditional_if(init_cuda, condition_value):
2222
mod = compile_conditional_kernels(type(condition_value))
2323
add_one = mod.get_kernel("add_one")
@@ -81,7 +81,7 @@ def test_graph_conditional_if(init_cuda, condition_value):
8181
@pytest.mark.parametrize(
8282
"condition_value", [True, False, ctypes.c_bool(True), ctypes.c_bool(False), np.bool_(True), np.bool_(False), 1, 0]
8383
)
84-
@requires_module(np, "2.1")
84+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
8585
def test_graph_conditional_if_else(init_cuda, condition_value):
8686
mod = compile_conditional_kernels(type(condition_value))
8787
add_one = mod.get_kernel("add_one")
@@ -153,7 +153,7 @@ def test_graph_conditional_if_else(init_cuda, condition_value):
153153

154154

155155
@pytest.mark.parametrize("condition_value", [0, 1, 2, 3])
156-
@requires_module(np, "2.1")
156+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
157157
def test_graph_conditional_switch(init_cuda, condition_value):
158158
mod = compile_conditional_kernels(type(condition_value))
159159
add_one = mod.get_kernel("add_one")
@@ -244,7 +244,7 @@ def test_graph_conditional_switch(init_cuda, condition_value):
244244

245245

246246
@pytest.mark.parametrize("condition_value", [True, False, 1, 0])
247-
@requires_module(np, "2.1")
247+
@requires_module(np, "2.2.5", reason="need numpy 2.2.5+ (numpy GH #28632)")
248248
def test_graph_conditional_while(init_cuda, condition_value):
249249
mod = compile_conditional_kernels(type(condition_value))
250250
add_one = mod.get_kernel("add_one")

0 commit comments

Comments
 (0)