Function device

Source
pub fn device() -> Result<Device>
Expand description

Returns the best available device for computation.

Prioritizes CUDA GPU if available, then Metal GPU on supported platforms, and falls back to CPU if no GPU acceleration is available.