# This file was generated by stubgen-pyx v0.2.6 from cuda_core/cuda/core/system/_nvml_context.pyx

from __future__ import annotations

import threading

_NVMLState = int
_lock = threading.Lock()

def _initialize() -> None:
    """
    Initializes NVIDIA Management Library (NVML), ensuring it only happens once per process.
    """

def validate() -> None:
    """
    Validate NVML state.

    Validate that NVML is initialized, functional and that the system has at
    least one GPU available.

    Raises
    ------
    nvml.UninitializedError
        If NVML hasn't been initialized.
    nvml.LibraryNotFoundError
        If the NVML library could not be found.
    nvml.GpuNotFoundError
        If no GPUs are available.
    """

def _get_nvml_state() -> _NVMLState:
    ...