Struct ort::QNNExecutionProvider
source · pub struct QNNExecutionProvider { /* private fields */ }
Implementations§
source§impl QNNExecutionProvider
impl QNNExecutionProvider
sourcepub fn with_backend_path(self, path: impl ToString) -> Self
pub fn with_backend_path(self, path: impl ToString) -> Self
The file path to QNN backend library. On Linux/Android, this is libQnnCpu.so
to use the CPU backend,
or libQnnHtp.so
to use the accelerated backend.
sourcepub fn with_enable_context_cache(self, enable: bool) -> Self
pub fn with_enable_context_cache(self, enable: bool) -> Self
Configure whether to enable QNN graph creation from a cached QNN context file. If enabled, the QNN EP will load from the cached QNN context binary if it exists, or create one if it does not exist.
sourcepub fn with_context_cache_path(self, path: impl ToString) -> Self
pub fn with_context_cache_path(self, path: impl ToString) -> Self
Explicitly provide the QNN context cache file (see QNNExecutionProvider::with_enable_context_cache
).
Defaults to model_file.onnx.bin
if not provided.
pub fn with_profiling(self, level: QNNExecutionProviderProfilingLevel) -> Self
sourcepub fn with_rpc_control_latency(self, latency: u32) -> Self
pub fn with_rpc_control_latency(self, latency: u32) -> Self
Allows client to set up RPC control latency in microseconds.
pub fn with_performance_mode( self, mode: QNNExecutionProviderPerformanceMode ) -> Self
pub fn build(self) -> ExecutionProviderDispatch
Trait Implementations§
source§impl Clone for QNNExecutionProvider
impl Clone for QNNExecutionProvider
source§fn clone(&self) -> QNNExecutionProvider
fn clone(&self) -> QNNExecutionProvider
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for QNNExecutionProvider
impl Debug for QNNExecutionProvider
source§impl Default for QNNExecutionProvider
impl Default for QNNExecutionProvider
source§fn default() -> QNNExecutionProvider
fn default() -> QNNExecutionProvider
Returns the “default value” for a type. Read more
source§impl ExecutionProvider for QNNExecutionProvider
impl ExecutionProvider for QNNExecutionProvider
source§fn as_str(&self) -> &'static str
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
fn supported_by_platform(&self) -> bool
Returns whether this execution provider is supported on this platform. Read more
source§impl From<QNNExecutionProvider> for ExecutionProviderDispatch
impl From<QNNExecutionProvider> for ExecutionProviderDispatch
source§fn from(value: QNNExecutionProvider) -> Self
fn from(value: QNNExecutionProvider) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QNNExecutionProvider
impl RefUnwindSafe for QNNExecutionProvider
impl Send for QNNExecutionProvider
impl Sync for QNNExecutionProvider
impl Unpin for QNNExecutionProvider
impl UnwindSafe for QNNExecutionProvider
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more