Expand description
ort
is a Rust binding for ONNX Runtime. For information on how to get started with ort
,
see https://ort.pyke.io/introduction.
Re-exports§
pub use ort_sys as sys;
Macros§
- Construct the inputs to a session from an array or named map of values.
Structs§
- An ONNX Runtime allocator, used to manage the allocation of
crate::Value
s. - The dynamic type marker, used for values which can be of any type.
- Struct used to build an
Environment
. - A
Session
where the graph data is stored in memory. - Information about a
Session
input. - Enables binding of session inputs and/or outputs to pre-allocated memory.
- Container for model metadata, including name & producer information.
- Information about a
Session
output. - A structure which can be passed to
Session::run_with_options
to allow terminating/unterminating a session inference run from a different thread. - An ONNX Runtime graph to be used for inference.
- Creates a session using the builder pattern.
- The outputs returned by a
crate::Session
inference call. - Holds onto an
ort_sys::OrtSession
pointer and its associated allocator. - A temporary version of a
Value
with a lifetime specifier. - A mutable temporary version of a
Value
with a lifetime specifier.
Enums§
- Represents possible devices that have their own device allocator.
- Execution provider allocator type.
- The strategy for extending the device memory arena.
- The type of search done for cuDNN convolution algorithms.
- An enum of all errors returned by ORT functions.
- Error details when ONNX C API returns an error.
- Execution provider container. See the ONNX Runtime docs for more info on execution providers. Execution providers are actually registered via the functions
crate::SessionBuilder
(per-session) orEnvironmentBuilder
(default for all sessions in an environment). - FetchModelError
fetch-models
Error from downloading pre-trained model from the ONNX Model Zoo. - ONNX Runtime provides various graph optimizations to improve performance. Graph optimizations are essentially graph-level transformations, ranging from small graph simplifications and node eliminations to more complex node fusions and layout optimizations.
- Memory types for allocated memory.
- The inputs to a
crate::Session::run
call. - Enum mapping ONNX Runtime’s supported tensor data types.
- The type of a
Value
, or a session input/output.
Constants§
- The minor version of ONNX Runtime used by this version of
ort
.
Traits§
- ArrayExtensions
ndarray
Trait extendingndarray::ArrayBase
with useful tensor operations. - Represents a type that a
DynValue
can be downcast to. - ONNX Runtime works with different hardware acceleration libraries through its extensible Execution Providers (EP) framework to optimally execute the ONNX models on the hardware platform. This interface enables flexibility for the AP application developer to deploy their ONNX models in different environments in the cloud and the edge and optimize the execution by taking advantage of the compute capabilities of the platform.
- Trait used to map Rust types (for example
f32
) to ONNX tensor element data types (for exampleFloat
). - Marker trait used to determine what operations can and cannot be performed on a
Value
of a given type.
Functions§
- Returns a pointer to the global
ort_sys::OrtApi
object. - Gets a reference to the global environment, creating one if an environment has been committed yet.
- Creates an ONNX Runtime environment.
- Creates an ONNX Runtime environment, dynamically loading ONNX Runtime from the library file (
.dll
/.so
/.dylib
) specified bypath
.
Type Aliases§
- Type alias for the Result type returned by ORT functions.