unilab.utils.device¶
Functions
Detect the best available device. |
|
Collect static hardware metadata (chip, cores, GPU, memory) for run records. |
|
|
Resolve a cross-platform torch device alias to a concrete device string. |
- unilab.utils.device.resolve_torch_device_alias(device, *, default='cpu')[source]¶
Resolve a cross-platform torch device alias to a concrete device string.
gpuis an abstract accelerator alias.cudais also accepted on macOS/MPS for config portability and maps tompswhen CUDA is absent. The function validates the resolved device and never silently falls back to CPU for unavailable accelerators.