Expand description
Device — selector for the training backend (apr pretrain).
Contract binding: contracts/entrenar/gpu-training-backend-v1.yaml
§device_dispatch.
The string grammar accepted by resolve_device is fixed by
INV-GPUTRAIN-001 / §device_dispatch.requested_device.grammar:
^(cpu|cuda(:[0-9]|:1[0-5])?|auto)$cpu— force the CPU (trueno SIMD) training path.cuda— alias forcuda:0.cuda:N(0..=15)— explicit CUDA device index.auto—cuda:0ifcuda_training_available(), elsecpu.
The auto resolution is NOT a silent fallback: callers are obliged
by GATE-GPUTRAIN-002 to print the resolved Device before starting
training so the operator sees which backend was actually selected.
Explicit cuda / cuda:N on a host without a usable CUDA runtime
MUST return DeviceError::CudaNotAvailable. FALSIFY-GPUTRAIN-002
binds this invariant.
Enums§
- Device
- Training backend selection.
- Device
Error - Failure modes for
resolve_device.
Functions§
- resolve_
device - Resolve a CLI
--devicestring into a concreteDevice.