pub fn local_gpu_count() -> Result<usize, String>Expand description
Number of GPUs on this box, or a caller-facing reason there are none.
One entry point for every “how many GPUs are here” question in fdl, across every vendor. The error is the point: an empty device list has several causes (no driver, driver present but its tool broken, hardware present without its stack installed, genuinely no card) and a command that was asked for GPUs must say which one it hit rather than silently resolving to zero.
Counts physical devices: --gpus/local_devices select from the
full set, and applying a visibility mask here would make the
selection depend on a mask the selection itself is about to set.