Coverage for cuda / core / system / __init__.py: 100.00%
13 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-08 01:07 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-08 01:07 +0000
1# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2#
3# SPDX-License-Identifier: Apache-2.0
6# NOTE: We must maintain that it is always possible to import this module
7# without CUDA being installed, and without CUDA being initialized or any
8# contexts created, so that a user can use NVML to explore things about their
9# system without loading CUDA.
12__all__ = [
13 "CUDA_BINDINGS_NVML_IS_COMPATIBLE",
14 "get_driver_version",
15 "get_driver_version_full",
16 "get_num_devices",
17 "get_process_name",
18]
21from ._system import *
23if CUDA_BINDINGS_NVML_IS_COMPATIBLE:
24 from ._device import *
25 from ._device import __all__ as _device_all
26 from ._system_events import *
27 from ._system_events import __all__ as _system_events_all
28 from .exceptions import *
29 from .exceptions import __all__ as _exceptions_all
31 __all__.append("get_nvml_version")
32 __all__.extend(_device_all)
33 __all__.extend(_system_events_all)
34 __all__.extend(_exceptions_all)