File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
src/tensorflow/lite/core/c Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ void* TfLiteOpaqueDelegateGetData(const TfLiteOpaqueDelegate* delegate) {
346
346
const auto * tflite_delegate =
347
347
reinterpret_cast <const TfLiteDelegate*>(delegate);
348
348
349
- if (!tflite_delegate->opaque_delegate_builder ) return nullptr ;
349
+ if (!tflite_delegate->opaque_delegate_builder ) return tflite_delegate-> data_ ;
350
350
351
351
return tflite_delegate->opaque_delegate_builder ->data ;
352
352
}
Original file line number Diff line number Diff line change @@ -1148,6 +1148,9 @@ void TfLiteOpaqueDelegateDelete(TfLiteOpaqueDelegate* delegate);
1148
1148
// - Or in case of any other error.
1149
1149
// - The 'delegate' has been constructed via a 'TfLiteOpaqueDelegateBuilder',
1150
1150
// but the 'data' field of the 'TfLiteOpaqueDelegateBuilder' is null.
1151
+ //
1152
+ // The data_ field of 'delegate' will be returned if the
1153
+ // 'opaque_delegate_builder' field is null.
1151
1154
void * TfLiteOpaqueDelegateGetData (const TfLiteOpaqueDelegate * delegate );
1152
1155
1153
1156
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments