Expand description
§onnx-runtime-memory-api
Low-dependency memory mechanism contracts shared by allocators, governors, and execution providers.
This crate is the lowest layer of the runtime memory stack. It owns the minimum ordinary allocator contract, explicit optional virtual-backing and shared-mapping capabilities, manager-issued binding identity/lifetime pins, and the owning/deferred-release contract that says who owns a physical release and what is true after one partially fails. It does not own allocation policy, accounting, synchronization, or process-level transaction management.
Governor-specific capacity tokens and grants remain in
onnx-runtime-memory-governor; they are not methods every allocator or
optional capability must implement.
Re-exports§
pub use allocator::AllocationCommitRange;pub use allocator::DeviceAllocator;pub use allocator::DeviceKey;pub use allocator::HostAllocator;pub use allocator::MappedAllocation;pub use binding::AllocationGeneration;pub use binding::AllocationIdentity;pub use binding::AuthorityIdentity;pub use binding::BindingError;pub use binding::BindingGeneration;pub use binding::BindingId;pub use binding::BindingIdentity;pub use binding::BindingRegistry;pub use binding::BindingResource;pub use binding::BoundAllocation;pub use binding::BoundMemoryView;pub use binding::BoundVirtualBacking;pub use binding::ExplicitReleaseError;pub use binding::MechanismCoherence;pub use binding::MechanismIdentity;pub use binding::MechanismLifecycle;pub use binding::MechanismSnapshot;pub use binding::MemoryBinding;pub use binding::OwnedView;pub use binding::OwningAllocation;pub use binding::OwningReleaseError;pub use binding::ProviderContextIdentity;pub use binding::RegisteredAuthority;pub use binding::RegisteredMechanism;pub use binding::RegisteredProviderContext;pub use binding::ValidatedMemoryView;pub use capability::VirtualBacking;pub use context_pin::ProviderContextPin;pub use context_pin::ProviderContextPinError;pub use context_pin::ProviderContextPinSource;pub use deferred::AllocationReleaseOutcome;pub use deferred::AllocationReleaseState;pub use deferred::DeferredEnqueueError;pub use deferred::DeferredEnqueueRejection;pub use deferred::DeferredReleaseDisposition;pub use deferred::DeferredReleaseQueue;pub use deferred::PreparedAllocationRelease;pub use deferred::QuarantineReason;pub use deferred::QuarantinedAllocation;pub use deferred::ReleaseAccounting;pub use deferred::ReleaseFailure;pub use deferred::ResidualOwnership;
Modules§
- allocator
- Primitive memory types and the ordinary allocator contract.
- binding
- Registry-issued memory bindings and lifetime pins.
- capability
- Optional capabilities discovered from an already-selected allocator.
- context_
pin - Keeping a provider/context alive across an outstanding deferred release.
- deferred
- Owning release: lifecycle vocabulary, structured outcomes, and the provider/context-owned deferred release queue.
Enums§
- Memory
Error - Shared error vocabulary for mechanism and governance operations.
- Memory
Role - What a reservation is for.
- Tier
- Where the bytes physically live.