Expand description
§onnx-runtime-eager
Eager (single-op) execution for the ORT 2.0 runtime (docs/EAGER.md).
Dispatch individual ONNX ops to execution-provider kernels without building
a graph — a PyTorch-style experience with ONNX op semantics.
This crate is the pure-Rust core of the design. It reuses the existing runtime abstractions rather than inventing parallel ones:
ExecutionProvider/Kernel/OpRegistryfromonnx-runtime-ep-api,- the populated CPU registry from
onnx-runtime-ep-cpu, - per-op shape/dtype inference from
onnx-runtime-shape-inference, - the IR vocabulary (
Node,DataType,Attribute, …) fromonnx-runtime-ir.
§Phase-1 scope (docs/EAGER.md)
Implemented: EagerContext, EagerContext::dispatch (single-op CPU
dispatch), the DomainRegistry, opset resolution
([opset]), and the compiled-KernelCache.
DEFERRED (each is flagged at its hook point):
- PyO3 / Python bindings (§11), including the
Tensorsingle→tensor / multi→tuple sugar andops.*typed wrappers (§4.1). - Subgraph ops
If/Loop/Scan(§7). - The opset context-manager /
nxrt.device()context (§5.3, §2.2). - GPU/CUDA EP dispatch and implicit cross-device transfer.
- Kernel-provided shape-inference fallback (§9.2).
- DLPack / numpy interop (§3).
Structs§
- Cache
Stats - Cache instrumentation, exposed for tests and diagnostics.
- Domain
Info - Metadata for one registered operator domain.
- Domain
Registry - Registry of known operator domains and their default opsets (
docs/EAGER.md§6.4). - Eager
Context - The process-wide eager execution context (
docs/EAGER.md§10.1). - Kernel
Cache - A bounded LRU of compiled kernels (
docs/EAGER.md§8.2). - Kernel
Cache Key - The cache key (
docs/EAGER.md§8.2KernelCacheKey). - Tensor
- An owned, device-aware tensor (
docs/EAGER.md§3).
Enums§
- Eager
Error - Errors produced while dispatching a single op in eager mode.
Constants§
- LATEST_
ONNX_ OPSET - The latest ONNX opset the runtime targets, used as the default for the
standard (
"") domain when a domain has no registered default.
Functions§
- global_
context - Get or lazily initialize the process-global eager context (
docs/EAGER.md§10.2). - resolve_
opset - Resolve the effective opset for a domain.
Type Aliases§
- Result
- A convenience
Resultalias for eager-dispatch operations.