pub struct OpenVINOExecutionProvider { /* private fields */ }
Implementations§
Source§impl OpenVINOExecutionProvider
impl OpenVINOExecutionProvider
Sourcepub fn with_device_type(self, device_type: impl ToString) -> Self
pub fn with_device_type(self, device_type: impl ToString) -> Self
Overrides the accelerator hardware type and precision with these values at runtime. If this option is not explicitly set, default hardware and precision specified during build time is used.
Sourcepub fn with_device_id(self, device_id: impl ToString) -> Self
pub fn with_device_id(self, device_id: impl ToString) -> Self
Selects a particular hardware device for inference. If this option is not explicitly set, an arbitrary free device will be automatically selected by OpenVINO runtime.
Sourcepub fn with_num_threads(self, num_threads: usize) -> Self
pub fn with_num_threads(self, num_threads: usize) -> Self
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 ToString) -> Self
pub fn with_cache_dir(self, dir: impl ToString) -> Self
Explicitly specify the path to save and load the blobs, enabling model caching.
Sourcepub fn with_opencl_context(self, context: *mut c_void) -> Self
pub fn with_opencl_context(self, context: *mut c_void) -> Self
This option is only alvailable when OpenVINO EP is built with OpenCL flags enabled. It takes in the remote
context i.e the cl_context
address as a void pointer.
Sourcepub fn with_opencl_throttling(self) -> Self
pub fn with_opencl_throttling(self) -> Self
This option enables OpenCL queue throttling for GPU devices (reduces CPU utilization when using GPU).
Sourcepub fn with_dynamic_shapes(self) -> Self
pub fn with_dynamic_shapes(self) -> Self
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.
pub fn with_npu_fast_compile(self) -> Self
pub fn build(self) -> ExecutionProviderDispatch
Trait Implementations§
Source§impl Clone for OpenVINOExecutionProvider
impl Clone for OpenVINOExecutionProvider
Source§fn clone(&self) -> OpenVINOExecutionProvider
fn clone(&self) -> OpenVINOExecutionProvider
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more