Struct ort::OpenVINOExecutionProvider

source ·
pub struct OpenVINOExecutionProvider { /* private fields */ }

Implementations§

source§

impl OpenVINOExecutionProvider

source

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.

source

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.

source

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.

source

pub fn with_cache_dir(self, dir: impl ToString) -> Self

Explicitly specify the path to save and load the blobs, enabling model caching.

source

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.

source

pub fn with_opencl_throttling(self) -> Self

This option enables OpenCL queue throttling for GPU devices (reduces CPU utilization when using GPU).

source

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.

source

pub fn with_npu_fast_compile(self) -> Self

source

pub fn build(self) -> ExecutionProviderDispatch

Trait Implementations§

source§

impl Clone for OpenVINOExecutionProvider

source§

fn clone(&self) -> OpenVINOExecutionProvider

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for OpenVINOExecutionProvider

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for OpenVINOExecutionProvider

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl ExecutionProvider for OpenVINOExecutionProvider

source§

fn as_str(&self) -> &'static str

Returns the identifier of this execution provider used internally by ONNX Runtime. Read more
source§

fn supported_by_platform(&self) -> bool

Returns whether this execution provider is supported on this platform. Read more
source§

fn register(&self, session_builder: &SessionBuilder) -> Result<()>

Attempts to register this execution provider on the given session.
source§

fn is_available(&self) -> Result<bool>

Returns Ok(true) if ONNX Runtime was compiled with support for this execution provider, and Ok(false) otherwise. Read more
source§

impl From<OpenVINOExecutionProvider> for ExecutionProviderDispatch

source§

fn from(value: OpenVINOExecutionProvider) -> Self

Converts to this type from the input type.
source§

impl Send for OpenVINOExecutionProvider

source§

impl Sync for OpenVINOExecutionProvider

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more