Expand description
Safe, named multi-input/multi-output inference on top of MNN.
The native interpreter and session live on a dedicated worker thread. This
keeps raw MNN handles out of application threads, makes Model safely
shareable, and guarantees that the session is destroyed before its
interpreter. All tensor data currently uses f32, matching the vision
models this initial release targets.
Re-exports§
pub use mnn_runtime_sys as sys;
Structs§
- Inference
Output - Inference tensors and timing diagnostics.
- Model
- A loaded, shareable MNN model.
- Model
Info - Immutable model input/output metadata.
- Pending
Run - An accepted request. Dropping it cancels work that has not entered MNN. Cancellation does not interrupt an active native call.
- RunTimings
- Measured wall times for one accepted request.
- Runtime
- Shareable model factory and process-level MNN execution policy.
- Runtime
Config - Configuration used for subsequently loaded models.
- Tensor
- Owned
f32tensor passed to or returned from a model. - Tensor
Info - Model tensor metadata at load time. Nonpositive dimensions are unresolved.
Use returned
Tensorshapes for the actual dimensions of a particular run.
Enums§
- Backend
- MNN execution backend.
- Error
- MNN runtime error.
- Execution
Mode - Coordination policy for multiple models in one process.
- GpuMemory
Mode OpenCLtensor storage; ignored by other backends.- GpuTuning
- GPU kernel search policy. Fast/Normal are
OpenCL-only. - Memory
Mode - Backend memory preference passed to MNN.
- Power
Mode - Power preference passed to MNN.
- Precision
Mode - Precision preference passed to MNN.
Type Aliases§
- Result
- Result type returned by this crate.