unilab.base.process_device.apply_collector_tensor_device_override¶
- unilab.base.process_device.apply_collector_tensor_device_override(env_cfg_override, backend_type, *, collector_tensor_device=None, learner_device=None)[source]¶
Return an env override selecting optional HOST_BRIDGE Torch carriers.
The input mapping is never mutated.
training.collector_tensor_deviceis the explicit training contract:cpuremains on CPU and unindexedcudais resolved to the current device by the environment.autofollows the learner device: a CUDA learner routes the rank-local (indexed) learner device string, while a CPU learner routes CPU and a torch.mps learner retains the owner/default CPU placement. Eligibility comes from the public SDK-free backend capability inventory: only aHOST_BRIDGEbackend may route this key, and the requested device family/index must be in its declaredtorch_devices.autois a no-op for backends outside that scope and when no learner device is known. Thelearner_deviceargument is the fallback for callers that do not compose a training configuration.An explicit
cpurequest with a known CUDA learner fails closed (issue #2483) unless the build is ROCm/HIP or the run carries theUNILAB_ALLOW_CUDA_LEARNER_CPU_CARRIERattribution-baseline/debug opt-in.