Skip to main content

gpu_backend

Function gpu_backend 

Source
pub fn gpu_backend() -> GpuBackend
Expand description

Select the best available forward-eval backend at runtime: CUDA → Metal → wgpu → CPU.

Each accelerator branch only exists when its feature is compiled in, and is taken only if the corresponding device/adapter is actually present (so a build with both GPU features still degrades cleanly to CPU on a machine with neither).