Skip to main content

gpu_adapter_present

Function gpu_adapter_present 

Source
pub fn gpu_adapter_present() -> bool
Expand description

Whether a usable GPU compute adapter exists, probed once and cached.

§Behaviour

  • Without the gpu feature, or on Android, this is false with no probe attempted.
  • Otherwise it asks wgpu for an adapter, once. false is a normal outcome — headless CI, a container, a machine with no discrete GPU — and is not an error. Nothing here panics or returns Err.

§Returns

true only if a GPU kernel could actually be dispatched.