Coverage for cuda/core/_build_info.pyx: 100.00%
4 statements
« prev ^ index » next coverage.py v7.18.0, created at 2026-12-03 01:06 +0000
« prev ^ index » next coverage.py v7.18.0, created at 2026-12-03 01:06 +0000
1# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2#
3# SPDX-License-Identifier: Apache-2.0
5"""What this build of cuda.core compiled against.
7``CUDA_MAJOR`` and ``CUDA_BINDINGS_FLOOR`` come from the compile-time environment
8that build_hooks.py sets. ``CUDA_VERSION`` is the ``CUDA_VERSION`` macro of the
9``cuda.h`` that the compiler resolved when it built this module, so the record
10cannot disagree with the binaries. ``cuda/core/__init__.py`` reads this module
11before it selects the build. The module imports nothing.
12"""
14cdef extern from "cuda.h":
15 enum: CUDA_H_VERSION "CUDA_VERSION"
17CUDA_MAJOR: int = CUDA_CORE_BUILD_MAJOR
18CUDA_VERSION: int = CUDA_H_VERSION
19CUDA_BINDINGS_FLOOR: tuple[int, int, int] = CUDA_CORE_BINDINGS_FLOOR