unilab.utils.device.resolve_torch_device_alias¶
- 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.