Snakepit.Hardware.CUDADetector (Snakepit v0.8.7)
View SourceCUDA GPU hardware detection.
Detects NVIDIA CUDA-capable GPUs using nvidia-smi when available.
Summary
Types
@type cuda_device() :: %{ id: non_neg_integer(), name: String.t(), memory_total_mb: non_neg_integer(), memory_free_mb: non_neg_integer(), compute_capability: String.t() | nil }
@type cuda_info() :: %{ version: String.t(), driver_version: String.t(), devices: [cuda_device()], cudnn_version: String.t() | nil }
Functions
@spec detect() :: cuda_info() | nil
Detects CUDA GPU information.
Returns nil if CUDA is not available, or a map with:
:version- CUDA runtime version (e.g., "12.1"):driver_version- NVIDIA driver version:devices- List of CUDA device maps:cudnn_version- cuDNN version if available, nil otherwise