Skip to main content

gpu_probe

Function gpu_probe 

Source
pub fn gpu_probe() -> (bool, Option<String>, Option<u64>)
Expand description

Probe GPU availability and adapter metadata without panicking.

Honours KEYHOG_NO_GPU=1 (and the usual on/off/true/false/0 negatives) by reporting “no GPU available” without ever calling backend::get_gpu(). The MoE compute-shader init happens lazily inside get_gpu(), so this short-circuit is the difference between “Metal adapter request blocks for minutes on certain Mac configurations” (the v0.5.27 reproduction on Apple M4 Pro that the env var was added to escape) and “scanner starts in ~10ms like every other CPU-only tool”.