Table of Contents

Method AcquireAsync

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

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.

ValueTask<OnnxSessionLease> AcquireAsync(string modelId, CancellationToken cancellationToken = default)

Parameters

modelId string

The registered model id.

cancellationToken CancellationToken

Cancellation. Also aborts a CoreML compile in flight.

Returns

ValueTask<OnnxSessionLease>

A lease that must be disposed.