pub struct OpenVINO { /* private fields */ }Expand description
OpenVINO execution provider for Intel CPUs/GPUs/NPUs.
Implementations§
Source§impl OpenVINO
impl OpenVINO
Sourcepub fn with_device_type(self, device_type: impl AsRef<str>) -> OpenVINO
pub fn with_device_type(self, device_type: impl AsRef<str>) -> OpenVINO
Overrides the accelerator hardware type and precision.
device_type should be in the format CPU, NPU, GPU, GPU.0, GPU.1, etc. Heterogenous combinations are
also supported in the format HETERO:NPU,GPU.
let ep = ep::OpenVINO::default().with_device_type("GPU.0").build();Sourcepub fn with_num_threads(self, num_threads: usize) -> OpenVINO
pub fn with_num_threads(self, num_threads: usize) -> OpenVINO
Overrides the accelerator default value of number of threads with this value at runtime. If this option is not explicitly set, default value of 8 is used during build time.
Sourcepub fn with_cache_dir(self, dir: impl AsRef<str>) -> OpenVINO
pub fn with_cache_dir(self, dir: impl AsRef<str>) -> OpenVINO
Explicitly specify the path to save and load the blobs, enabling model caching.
Sourcepub fn with_opencl_throttling(self, enable: bool) -> OpenVINO
pub fn with_opencl_throttling(self, enable: bool) -> OpenVINO
This option enables OpenCL queue throttling for GPU devices (reduces CPU utilization when using GPU).
pub fn with_qdq_optimizer(self, enable: bool) -> OpenVINO
Sourcepub fn with_dynamic_shapes(self, enable: bool) -> OpenVINO
pub fn with_dynamic_shapes(self, enable: bool) -> OpenVINO
This option if enabled works for dynamic shaped models whose shape will be set dynamically based on the infer input image/data shape at run time in CPU. This gives best result for running multiple inferences with varied shaped images/data.