Coverage for cuda/core/_utils/runtime_cuda_error_explanations.py: 71.43%

7 statements  

« prev     ^ index     » next       coverage.py v7.14.1, created at 2026-06-13 01:38 +0000

1# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 

2# SPDX-License-Identifier: Apache-2.0 

3 

4from __future__ import annotations 1ab

5 

6from cuda.bindings import runtime 1ab

7from cuda.core._utils.enum_explanations_helpers import get_best_available_explanations 1ab

8 

9 

10def _load_fallback_explanations() -> dict[int, str | tuple[str, ...]]: 1ab

11 from cuda.core._utils.runtime_cuda_error_explanations_frozen import _FALLBACK_EXPLANATIONS 

12 

13 return _FALLBACK_EXPLANATIONS # type: ignore[return-value] 

14 

15 

16RUNTIME_CUDA_ERROR_EXPLANATIONS = get_best_available_explanations(runtime.cudaError_t, _load_fallback_explanations) 1ab