Table of Contents

Interface IOnnxSessionHost

Namespace
Qavren.Edge.Onnx
Assembly
Qavren.Edge.Onnx.dll

Owns every InferenceSession in the process. There is deliberately NO byte-array entry point: a byte[] overload holds the managed array and ORT's copy of the initializers simultaneously during creation (about 180 MB transient for fp32 MiniLM) and degrades ORT's CoreML cache key from the model-URL hash to a hash of graph inputs and node outputs, which collides across quantization variants of one architecture. A consumer cannot take that path.

public interface IOnnxSessionHost

Properties

Sessions

Every session this host knows about, loaded or dropped.

Methods

AcquireAsync(string, CancellationToken)

Awaits IEdgeHost.EnsureStartedAsync, provisions the model if needed, checks the memory budget, creates the session on first call, and returns a lease. Concurrent callers for one model share one session and one in-flight load.

Describe(string)

The session's facts, or null when this model has never been loaded.

DropAsync(bool, CancellationToken)

Marks matching sessions for drop and disposes the idle ones. Returns the count actually released; leased sessions die as their leases return.