pub fn parse_device_string(device: &str) -> Result<DeviceType, PiperError>Expand description
Parse a device string (“cpu”, “cuda”, “cuda:0”, “cuda:1”, “coreml”,
“directml”, “directml:2”, “tensorrt”, “tensorrt:0”, “auto”) into a
DeviceType.
The string is matched case-insensitively.