fromBufferWithGpuFallback static method

CompiledModel fromBufferWithGpuFallback(
  1. Uint8List bytes, {
  2. bool forceCpu = false,
  3. Precision precision = Precision.fp32,
  4. TensorBufferMode tensorBufferMode = TensorBufferMode.managed,
  5. void onFallback(
    1. Object error
    )?,
})

Creates a compiled model from bytes, preferring GPU with a CPU fallback.

Implementation

static CompiledModel fromBufferWithGpuFallback(
  Uint8List bytes, {
  bool forceCpu = false,
  Precision precision = Precision.fp32,
  TensorBufferMode tensorBufferMode = TensorBufferMode.managed,
  void Function(Object error)? onFallback,
}) {
  throw UnsupportedError('CompiledModel is not supported on this platform.');
}