Skip to main content

Crate onnx_runtime_ep_api

Crate onnx_runtime_ep_api 

Source
Expand description

§onnx-runtime-ep-api

The Execution Provider (EP) interface for the ORT 2.0 runtime (see docs/ORT2.md §4). Every backend — CPU, CUDA, MLX, or a legacy ORT plugin loaded via dlopen — implements the same ExecutionProvider trait; only the loading mechanism differs.

This is a Phase 1 skeleton: trait and type signatures are real and reference the onnx_runtime_ir contract, but method bodies live in the concrete EP crates (e.g. onnx-runtime-ep-cpu). Zero-copy tensor views and the ORT ABI bridge require unsafe FFI and are stubbed here.

§Modules

Re-exports§

pub use epcontext::build_ep_context_registry;
pub use epcontext::EpContext;
pub use epcontext::EpContextRegistry;
pub use kernel::Cost;
pub use kernel::Kernel;
pub use kernel::KernelMatch;
pub use kernel::ViewOutput;
pub use provider::DeviceBuffer;
pub use provider::EpConfig;
pub use provider::EpId;
pub use provider::ExecutionProvider;
pub use provider::Fence;
pub use provider::OptimizerPass;
pub use provider::OrtPluginExport;
pub use registry::EpRegistry;
pub use registry::KernelFactory;
pub use registry::OpKey;
pub use registry::OpRegistry;
pub use tensor::DevicePtr;
pub use tensor::DevicePtrMut;
pub use tensor::TensorMut;
pub use tensor::TensorView;

Modules§

abi
ORT graph ABI bridge for legacy plugin EPs (§3.4, §4.5).
epcontext
Runtime EpContext form and the source-keyed EpContextRegistry (docs/ORT2.md §55.1 / §55.6).
kernel
The Kernel trait and kernel-match / cost types (§4.2).
provider
The ExecutionProvider trait and its supporting types (§4.1).
registry
Op → kernel-factory registry and the EP registry (§4.3, §4.6).
tensor
Zero-copy device tensor views (§5.4) and their DLPack alignment (§5.3).

Structs§

DeviceId
A specific device instance: a DeviceType plus an ordinal index.

Enums§

DeviceType
A class of compute device / execution backend.
EpError
Errors produced by execution providers and kernels (subset of the runtime top-level Error, docs/ORT2.md §22).

Type Aliases§

Result
A convenience Result alias for EP operations.