diff --git a/.github/RELEASE-core.md b/.github/RELEASE-core.md index 01e182c76e..465f1d9646 100644 --- a/.github/RELEASE-core.md +++ b/.github/RELEASE-core.md @@ -66,6 +66,21 @@ requirements are current. --- +## Refresh frozen fallback explanation tables + +When this release adds support for a new CUDA Toolkit version, check +whether the CTK release added any new `CUresult` or `cudaError_t` codes. +If so, update the frozen fallback tables so error messages stay +informative for consumers on older `cuda-bindings` versions: + +- `cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py` +- `cuda_core/cuda/core/_utils/runtime_cuda_error_explanations_frozen.py` + +The corresponding tests in `test_utils_enum_explanations_helpers.py` +will fail if an entry is missing. + +--- + ## Finalize the doc update, including release notes Review every PR included in the release. For each one, check whether new diff --git a/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py b/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py index 567b969038..4fa9114ea1 100644 --- a/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py +++ b/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CUDA Toolkit v13.1.1 +# CUDA Toolkit v13.3 _FALLBACK_EXPLANATIONS = { 0: ( "The API call returned with no errors. In the case of query calls, this" @@ -346,5 +346,6 @@ " stream is in a detached state. This can occur if the green context associated" " with the stream has been destroyed, limiting the stream's operational capabilities." ), + 918: "This error indicates that a graph recapture failed and had to be terminated.", 999: "This indicates that an unknown internal error has occurred.", } diff --git a/cuda_core/tests/test_utils_enum_explanations_helpers.py b/cuda_core/tests/test_utils_enum_explanations_helpers.py index 6d4c9e32b8..59e39cda70 100644 --- a/cuda_core/tests/test_utils_enum_explanations_helpers.py +++ b/cuda_core/tests/test_utils_enum_explanations_helpers.py @@ -168,3 +168,12 @@ def test_runtime_explanations_module_skips_fallback_import_when_docstrings_avail assert "cuda.core._utils.runtime_cuda_error_explanations_frozen" not in sys.modules assert isinstance(runtime_explanations.RUNTIME_CUDA_ERROR_EXPLANATIONS, DocstringBackedExplanations) + + +@pytest.mark.human_authored +def test_frozen_driver_table_covers_all_curesult_members(): + from cuda.bindings import driver + from cuda.core._utils.driver_cu_result_explanations_frozen import _FALLBACK_EXPLANATIONS + + missing = [m.name for m in driver.CUresult if int(m) not in _FALLBACK_EXPLANATIONS] + assert not missing, f"Missing frozen fallback explanations for: {missing}"