bindMetalBufferToTensor method
Binds a Metal buffer to an input or output tensor.
The bound buffer must have sufficient storage for all tensor elements. For quantized models, the buffer is bound to the internal dequantized float32 tensor.
Must be called after the delegate has been applied to the interpreter. Returns true on success.
Implementation
bool bindMetalBufferToTensor(int tensorIndex, int metalBuffer) {
checkState(!_deleted, message: 'TfLiteGpuDelegate already deleted.');
return _metalBinding.TFLGpuDelegateBindMetalBufferToTensor(
_delegate,
tensorIndex,
metalBuffer,
);
}