#import "MetalDelagate.h" #import "plat_delegate.h" #import @implementation MetalDelagate void* create_delegate() { TFLGpuDelegateOptions delegateOpts = { .allow_precision_loss = true, .wait_type = TFLGpuDelegateWaitType::TFLGpuDelegateWaitTypeActive, // .wait_type = TFLGpuDelegateWaitType::TFLGpuDelegateWaitTypePassive, // .wait_type = TFLGpuDelegateWaitType::TFLGpuDelegateWaitTypeDoNotWait, // .wait_type = TFLGpuDelegateWaitType::TFLGpuDelegateWaitTypeAggressive, .enable_quantization = true, }; auto *TFLGpuDelegate = TFLGpuDelegateCreate(&delegateOpts); return TFLGpuDelegate; } void delete_delegate(void *delegate) { TFLGpuDelegateDelete((TfLiteDelegate *)delegate); } @end