From b220b81c3df85872df5b2ed290d837e197c330a1 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Wed, 9 Sep 2026 16:06:45 -0700 Subject: [PATCH] [no-ci] Refreeze enum tables (revert 2383, add comment) (#2792) * Revert "cuda.core: refresh frozen CUresult explanation table for CUDA 13.3 (#2383)" This reverts commit 3df61150e66e697f6c9ba18a4c1798a77e3b3af1. * Add comment: Do not update it past CUDA Toolkit v13.1.1 * Narrow CI workaround for cufile ABI issue (cherry picked from commit 7b89d2c8444c7354cb716fa41dae9bb865d05e52) --- .github/RELEASE-core.md | 15 --------------- .../driver_cu_result_explanations_frozen.py | 10 ++++++++-- .../tests/test_utils_enum_explanations_helpers.py | 9 --------- 3 files changed, 8 insertions(+), 26 deletions(-) diff --git a/.github/RELEASE-core.md b/.github/RELEASE-core.md index a4509cc4872..a93b3ed8d61 100644 --- a/.github/RELEASE-core.md +++ b/.github/RELEASE-core.md @@ -89,21 +89,6 @@ changes, so they are only permitted at a major-version boundary per the --- -## 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 4fa9114ea18..41eb158f4e2 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,14 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CUDA Toolkit v13.3 +# Like the runtime counterpart, this fallback is a deliberately frozen +# compatibility snapshot, not a release-maintained mirror of CUDA's enums. +# Do not update it past CUDA Toolkit v13.1.1. Bindings releases new enough to +# define later codes provide explanations through enum-member docstrings; if an +# older binding receives one from a newer driver, it falls through to +# cuGetErrorString(). Synchronizing this table with later Toolkit releases would +# restore the duplicate maintenance burden removed by PR #1860. +# CUDA Toolkit v13.1.1 _FALLBACK_EXPLANATIONS = { 0: ( "The API call returned with no errors. In the case of query calls, this" @@ -346,6 +353,5 @@ " 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 59e39cda701..6d4c9e32b82 100644 --- a/cuda_core/tests/test_utils_enum_explanations_helpers.py +++ b/cuda_core/tests/test_utils_enum_explanations_helpers.py @@ -168,12 +168,3 @@ 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}"