Skip to main content

get_inference_device

Function get_inference_device 

Source
pub fn get_inference_device(force_cpu: bool, ordinal: usize) -> Result<Device>
Expand description

Returns the best available device at ordinal index (in case of multiple GPUs), or CPU if force_cpu is true.