Skip to content

Commit 901323d

Browse files
committed
Merge remote-tracking branch 'rwgk/refreeze_enum_tables' into 13.4.x
2 parents 52c4c14 + e253173 commit 901323d

3 files changed

Lines changed: 8 additions & 38 deletions

File tree

‎.github/RELEASE-core.md‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,6 @@ changes, so they are only permitted at a major-version boundary per the
8989

9090
---
9191

92-
## Refresh frozen fallback explanation tables
93-
94-
When this release adds support for a new CUDA Toolkit version, check
95-
whether the CTK release added any new `CUresult` or `cudaError_t` codes.
96-
If so, update the frozen fallback tables so error messages stay
97-
informative for consumers on older `cuda-bindings` versions:
98-
99-
- `cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py`
100-
- `cuda_core/cuda/core/_utils/runtime_cuda_error_explanations_frozen.py`
101-
102-
The corresponding tests in `test_utils_enum_explanations_helpers.py`
103-
will fail if an entry is missing.
104-
105-
---
106-
10792
## Finalize the doc update, including release notes
10893

10994
Review every PR included in the release. For each one, check whether new

‎cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py‎

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
# CUDA Toolkit v13.4
4+
# Like the runtime counterpart, this fallback is a deliberately frozen
5+
# compatibility snapshot, not a release-maintained mirror of CUDA's enums.
6+
# Do not update it past CUDA Toolkit v13.1.1. Bindings releases new enough to
7+
# define later codes provide explanations through enum-member docstrings; if an
8+
# older binding receives one from a newer driver, it falls through to
9+
# cuGetErrorString(). Synchronizing this table with later Toolkit releases would
10+
# restore the duplicate maintenance burden removed by PR #1860.
11+
# CUDA Toolkit v13.1.1
512
_FALLBACK_EXPLANATIONS = {
613
0: (
714
"The API call returned with no errors. In the case of query calls, this"
@@ -54,10 +61,6 @@
5461
" time. Devices are often unavailable due to use of"
5562
" ::CU_COMPUTEMODE_EXCLUSIVE_PROCESS or ::CU_COMPUTEMODE_PROHIBITED."
5663
),
57-
47: (
58-
"The API call failed because of a hardware resource required to bind memory"
59-
" to a multicast object is unavailable."
60-
),
6164
100: ("This indicates that no CUDA-capable devices were detected by the installed CUDA driver."),
6265
101: (
6366
"This indicates that the device ordinal supplied by the user does not"
@@ -123,7 +126,6 @@
123126
" work will return the same error. To continue using CUDA, the process must"
124127
" be terminated and relaunched."
125128
),
126-
227: "This indicates that the Loader version is insufficient for fatbin",
127129
300: (
128130
"This indicates that the device kernel source is invalid. This includes"
129131
" compilation/linker errors encountered in device code or user error."
@@ -351,13 +353,5 @@
351353
" stream is in a detached state. This can occur if the green context associated"
352354
" with the stream has been destroyed, limiting the stream's operational capabilities."
353355
),
354-
918: "This error indicates that a graph recapture failed and had to be terminated.",
355-
919: (
356-
"The GPU fabric is not ready within the bounded wait while the fabric"
357-
" manager probe is still in progress (or not converging in time)."
358-
" Applications may retry after a delay; for the initialization wait budget,"
359-
" see environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS. The CUDA"
360-
" Runtime uses the same value as cudaErrorFabricNotReady."
361-
),
362356
999: "This indicates that an unknown internal error has occurred.",
363357
}

‎cuda_core/tests/test_utils_enum_explanations_helpers.py‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,3 @@ def test_runtime_explanations_module_skips_fallback_import_when_docstrings_avail
168168

169169
assert "cuda.core._utils.runtime_cuda_error_explanations_frozen" not in sys.modules
170170
assert isinstance(runtime_explanations.RUNTIME_CUDA_ERROR_EXPLANATIONS, DocstringBackedExplanations)
171-
172-
173-
@pytest.mark.human_authored
174-
def test_frozen_driver_table_covers_all_curesult_members():
175-
from cuda.bindings import driver
176-
from cuda.core._utils.driver_cu_result_explanations_frozen import _FALLBACK_EXPLANATIONS
177-
178-
missing = [m.name for m in driver.CUresult if int(m) not in _FALLBACK_EXPLANATIONS]
179-
assert not missing, f"Missing frozen fallback explanations for: {missing}"

0 commit comments

Comments
 (0)