Update MediaPipe TFLite code to use generic "shim" symbols and headers

PiperOrigin-RevId: 511265313
This commit is contained in:
MediaPipe Team
2023-02-21 11:58:32 -08:00
committed by Copybara-Service
parent 8a0830ce7b
commit 9a6d5e0444
6 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -44,8 +44,8 @@ cc_library(
"//mediapipe/util/tflite/operations:transform_tensor_bilinear",
"//mediapipe/util/tflite/operations:transpose_conv_bias",
"@org_tensorflow//tensorflow/lite:builtin_op_data",
"@org_tensorflow//tensorflow/lite:framework",
"@org_tensorflow//tensorflow/lite/kernels:builtin_ops",
"@org_tensorflow//tensorflow/lite/core/shims:builtin_ops",
"@org_tensorflow//tensorflow/lite/core/shims:framework_stable",
],
# For using the symbol `MediaPipe_RegisterTfLiteOpResolver` in Python
# with `tensorflow.lite.python.interpreter.InterpreterWithCustomOps`.
@@ -69,7 +69,7 @@ cc_library(
hdrs = ["op_resolver.h"],
deps = [
"@org_tensorflow//tensorflow/lite:builtin_op_data",
"@org_tensorflow//tensorflow/lite/kernels:builtin_ops",
"@org_tensorflow//tensorflow/lite/core/shims:builtin_ops",
],
)
+3 -3
View File
@@ -15,7 +15,7 @@
#ifndef MEDIAPIPE_UTIL_TFLITE_CPU_OP_RESOLVER_H_
#define MEDIAPIPE_UTIL_TFLITE_CPU_OP_RESOLVER_H_
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/core/shims/cc/kernels/register.h"
namespace mediapipe {
@@ -27,8 +27,8 @@ extern "C" void MediaPipe_RegisterTfLiteOpResolver(tflite::MutableOpResolver*);
// This resolver is used for the custom ops introduced by
// `MediaPipe_RegisterTfLiteOpResolver` (see above).
class CpuOpResolver
: public tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates {
class CpuOpResolver : public tflite_shims::ops::builtin::
BuiltinOpResolverWithoutDefaultDelegates {
public:
CpuOpResolver() { MediaPipe_RegisterTfLiteOpResolver(this); }
};
+3 -3
View File
@@ -15,13 +15,13 @@
#ifndef MEDIAPIPE_UTIL_TFLITE_OP_RESOLVER_H_
#define MEDIAPIPE_UTIL_TFLITE_OP_RESOLVER_H_
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/core/shims/cc/kernels/register.h"
namespace mediapipe {
// This OpResolver is used for supporting "Convolution2DTransposeBias" on GPU.
class OpResolver
: public tflite::ops::builtin::BuiltinOpResolverWithoutDefaultDelegates {
class OpResolver : public tflite_shims::ops::builtin::
BuiltinOpResolverWithoutDefaultDelegates {
public:
OpResolver();
};