GpuDelegateV2 class

GPU delegate for Android 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

GpuDelegateV2({GpuDelegateOptionsV2? options})
Creates GpuDelegateV2 using the specified options. Uses default options if options is not specified.
factory

Properties

base Pointer<TfLiteDelegate>
Get pointer to TfLiteDelegate
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete() → void
Releases native GPU 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