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 Freeze for NNPreload
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