GpuDelegate class
Metal Delegate for iOS and macOS Prefer PerformanceConfig over constructing this directly: it picks a sensible delegate per platform and handles the fallback when one declines a model. This class stays available for callers that need to configure a delegate themselves.
Not deprecated in favour of CompiledModel. LiteRT Next is the direction
upstream is taking, but as of flutter_litert 3.7.0 it miscomputes models
whose output tensor ends up dynamic, returning kLiteRtStatusOk while the
output buffer is never written (see doc/delegate_verification.md and
verifyCompiledModel). Until that is fixed upstream, delegate-backed
Interpreter inference is the correct choice for those models, so pointing
callers away from it would be wrong.
- Implemented types
Constructors
- GpuDelegate({GpuDelegateOptions? options})
-
Creates a Metal GPU delegate with optional
options.factory
Properties
Methods
-
bindMetalBufferToTensor(
int tensorIndex, int metalBuffer) → bool - Binds a Metal buffer to an input or output tensor.
-
delete(
) → void -
Releases native Metal delegate resources.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited