device_resolve
Torch device selection for Moirai-MoE (no uni2ts import — safe for lightweight unit tests).
resolve_moirai_moe_torch_device(device_setting)
Map settings.yaml device string to a torch.device.
auto/cuda_if_available: CUDA whentorch.cuda.is_availableelse CPU.cuda: CUDA only; raises if CUDA is not available.cuda:N: specific GPU index when CUDA is available.cpu: CPU.
| Parameter | Type | Default | Description |
|---|---|---|---|
| device_setting | str | - | (undocumented) |
Returns: torch.device
Raises:
RuntimeError: If a CUDA device is requested (cuda or cuda:N) but CUDA is not available.