Skip to content

Commit 9f5f193

Browse files
mdboomrwgkjuenglin
authored
Prepare the 13.4.2 release (#2900)
* Prepare the 13.4.2 release * Simplify release note * Fix typo * test(pathfinder): handle cuTENSORMg removal in cuTENSOR 2.8 (#2809) * Add pathfinder support for cupti64_2026.3.1.dll (CTK 13.4.1) (#2896) The nvidia-cu13 wheel now ships cupti64_2026.3.1.dll, which was not listed in the cupti descriptor's windows_dlls, causing test_load_nvidia_dynamic_lib[cupti] to fail under all_must_work. --------- Co-authored-by: Ralf W. Grosse-Kunstleve <rwgkio@gmail.com> Co-authored-by: Ralf Juengling <rjuengling@nvidia.com>
1 parent 0770ab6 commit 9f5f193

9 files changed

Lines changed: 102 additions & 43 deletions

File tree

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ correct.** Each package matches its own tag prefix:
4848

4949
| Package | Tag pattern |
5050
| --- | --- |
51-
| `cuda-bindings`, `cuda-python` | `v*` (e.g. `v13.4.1`) |
51+
| `cuda-bindings`, `cuda-python` | `v*` (e.g. `v13.4.2`) |
5252
| `cuda-core` | `cuda-core-v*` (e.g. `cuda-core-v1.1.0`) |
5353
| `cuda-pathfinder` | `cuda-pathfinder-v*` (e.g. `cuda-pathfinder-v1.6.0`) |
5454

@@ -109,7 +109,7 @@ version-check failure:
109109
`cuda-bindings` to that same bogus version.
110110
2. **Stale tags** (a fork that has not fetched upstream in a while): you get a
111111
plausible-looking but wrong version, e.g. `13.0.4.dev650+g0d22cb44` when the
112-
real latest tag is `v13.4.1`. Nothing warns you. Note there is no leading
112+
real latest tag is `v13.4.2`. Nothing warns you. Note there is no leading
113113
`v` — the tag prefix is stripped by `tag_regex`.
114114
3. **No git metadata** (source zip): the build fails with
115115
`LookupError: setuptools-scm was unable to detect version`.

ci/test-matrix.yml

Lines changed: 38 additions & 38 deletions
Large diffs are not rendered by default.

ci/versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ backport_branch: "12.9.x" # keep in sync with target-branch in .github/dependab
55

66
cuda:
77
build:
8-
version: "13.4.1"
8+
version: "13.4.2"
99
prev_build:
1010
version: "12.9.1"

cuda_bindings/docs/nv-versions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"version": "latest",
44
"url": "https://nvidia.github.io/cuda-python/cuda-bindings/latest/"
55
},
6+
{
7+
"version": "13.4.2",
8+
"url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.4.2/"
9+
},
610
{
711
"version": "13.4.1",
812
"url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.4.1/"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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.2 Release notes
7+
======================================
8+
9+
Bugfixes
10+
--------
11+
12+
- ``cuda-bindings`` is rebuilt against CUDA toolkit 13.4.2, and thus gets all of its bugfixes.
13+
14+
Known issues
15+
------------
16+
17+
* 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``.
18+
* ``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_pathfinder/cuda/pathfinder/_dynamic_libs/descriptor_catalog.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ class DescriptorSpec:
362362
packaged_with="ctk",
363363
linux_sonames=("libcupti.so.13", "libcupti.so.12"),
364364
windows_dlls=(
365+
"cupti64_2026.3.1.dll",
365366
"cupti64_2026.3.0.dll",
366367
"cupti64_2026.2.1.dll",
367368
"cupti64_2026.2.0.dll",
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

44
import functools
55
import importlib.metadata
66
import re
77

8+
from packaging.version import Version
9+
810

911
@functools.cache
10-
def have_distribution(name_pattern: str) -> bool:
12+
def have_distribution(name_pattern: str, *, minimum_version: str | None = None) -> bool:
1113
re_name_pattern = re.compile(name_pattern)
14+
parsed_minimum_version = Version(minimum_version) if minimum_version is not None else None
1215
return any(
1316
re_name_pattern.match(dist.metadata["Name"])
17+
and (parsed_minimum_version is None or Version(dist.version) >= parsed_minimum_version)
1418
for dist in importlib.metadata.distributions()
1519
if "Name" in dist.metadata
1620
)

cuda_pathfinder/tests/test_load_nvidia_dynamic_lib.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import os
55
import platform
66
from pathlib import Path
7+
from types import SimpleNamespace
78

89
import pytest
910
from child_load_nvidia_dynamic_lib_helper import (
@@ -123,12 +124,39 @@ def test_known_but_platform_unavailable_libname_raises_dynamic_lib_not_available
123124
def _is_expected_load_nvidia_dynamic_lib_failure(libname):
124125
if libname == "nvpl_fftw" and platform.machine().lower() != "aarch64":
125126
return True
127+
if libname == "cutensorMg":
128+
# cuTENSOR 2.8 removed cuTENSORMg in favor of cuTENSORMp.
129+
return have_distribution(r"^cutensor-cu(?:12|13)$", minimum_version="2.8")
126130
dist_name_pattern = IMPORTLIB_METADATA_DISTRIBUTIONS_NAMES.get(libname)
127131
if dist_name_pattern is not None:
128132
return not have_distribution(dist_name_pattern)
129133
return False
130134

131135

136+
@pytest.mark.parametrize(
137+
("installed_distributions", "expected"),
138+
[
139+
([], False),
140+
([SimpleNamespace(metadata={"Name": "cutensor-cu13"}, version="2.7.0")], False),
141+
([SimpleNamespace(metadata={"Name": "cutensor-cu12"}, version="2.8.0")], True),
142+
([SimpleNamespace(metadata={"Name": "cutensor-cu13"}, version="2.9.0")], True),
143+
([SimpleNamespace(metadata={"Name": "unrelated-package"}, version="2.8.0")], False),
144+
],
145+
)
146+
@pytest.mark.agent_authored(model="gpt-5.6-sol")
147+
def test_cutensor_mg_expected_failure_follows_installed_cutensor_version(
148+
mocker,
149+
installed_distributions,
150+
expected,
151+
):
152+
mocker.patch("local_helpers.importlib.metadata.distributions", return_value=installed_distributions)
153+
have_distribution.cache_clear()
154+
try:
155+
assert _is_expected_load_nvidia_dynamic_lib_failure("cutensorMg") is expected
156+
finally:
157+
have_distribution.cache_clear()
158+
159+
132160
@pytest.mark.parametrize(
133161
"libname",
134162
supported_nvidia_libs.SUPPORTED_WINDOWS_DLLS if IS_WINDOWS else supported_nvidia_libs.SUPPORTED_LINUX_SONAMES,

cuda_python/docs/nv-versions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"version": "latest",
44
"url": "https://nvidia.github.io/cuda-python/latest/"
55
},
6+
{
7+
"version": "13.4.2",
8+
"url": "https://nvidia.github.io/cuda-python/13.4.2/"
9+
},
610
{
711
"version": "13.4.1",
812
"url": "https://nvidia.github.io/cuda-python/13.4.1/"

0 commit comments

Comments
 (0)