Struct wasmedge_sdk::plugin::NNPreload
source · pub struct NNPreload { /* private fields */ }
Available on crate feature
wasi_nn
only.Expand description
Preload config for initializing the wasi_nn plug-in.
Implementations§
source§impl NNPreload
impl NNPreload
sourcepub fn new(
alias: impl AsRef<str>,
backend: GraphEncoding,
target: ExecutionTarget,
path: impl AsRef<Path>
) -> Self
pub fn new( alias: impl AsRef<str>, backend: GraphEncoding, target: ExecutionTarget, path: impl AsRef<Path> ) -> Self
Creates a new preload config.
Arguments
-
alias
- The alias of the model in the WASI-NN environment. -
backend
- The inference backend. -
target
- The execution target, on which the inference runs. -
path
- The path to the model file. Note that the path is the guest path instead of the host path.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for NNPreload
impl Send for NNPreload
impl Sync for NNPreload
impl Unpin for NNPreload
impl UnwindSafe for NNPreload
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