Skip to content

Commit 3df6115

Browse files
Symbioosemdboomleofang
authored
cuda.core: refresh frozen CUresult explanation table for CUDA 13.3 (NVIDIA#2383)
* Add CUDA_ERROR_GRAPH_RECAPTURE_FAILURE to frozen CUresult table (CUDA 13.3) * docs: add frozen fallback table refresh step to release checklist --------- Co-authored-by: Michael Droettboom <[email protected]> Co-authored-by: Leo Fang <[email protected]>
1 parent 858fb2f commit 3df6115

3 files changed

Lines changed: 26 additions & 1 deletion

File tree

‎.github/RELEASE-core.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,21 @@ 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+
92107
## Finalize the doc update, including release notes
93108

94109
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.1.1
4+
# CUDA Toolkit v13.3
55
_FALLBACK_EXPLANATIONS = {
66
0: (
77
"The API call returned with no errors. In the case of query calls, this"
@@ -346,5 +346,6 @@
346346
" stream is in a detached state. This can occur if the green context associated"
347347
" with the stream has been destroyed, limiting the stream's operational capabilities."
348348
),
349+
918: "This error indicates that a graph recapture failed and had to be terminated.",
349350
999: "This indicates that an unknown internal error has occurred.",
350351
}

‎cuda_core/tests/test_utils_enum_explanations_helpers.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,12 @@ 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)