aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/interpreter_test.cc
diff options
context:
space:
mode:
authorGravatar Jared Duke <jdduke@google.com>2018-10-04 12:59:38 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-04 13:04:08 -0700
commit158b6b8becb6afd08f9d6c87f0c7f144ba5f0584 (patch)
tree52bbbadbcce1ea40a170eae684cd7d662da25350 /tensorflow/contrib/lite/interpreter_test.cc
parent2c75da86ffdb9d04b2b94ce89891f17a8656da22 (diff)
Use weak symbols to inject flex delegates
PiperOrigin-RevId: 215788183
Diffstat (limited to 'tensorflow/contrib/lite/interpreter_test.cc')
-rw-r--r--tensorflow/contrib/lite/interpreter_test.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/contrib/lite/interpreter_test.cc b/tensorflow/contrib/lite/interpreter_test.cc
index cdede430e2..6c71d5a8d7 100644
--- a/tensorflow/contrib/lite/interpreter_test.cc
+++ b/tensorflow/contrib/lite/interpreter_test.cc
@@ -30,7 +30,11 @@ class InterpreterTest : public ::testing::Test {
template <typename Delegate>
static TfLiteStatus ModifyGraphWithDelegate(
Interpreter* interpreter, std::unique_ptr<Delegate> delegate) {
- return interpreter->ModifyGraphWithDelegate(std::move(delegate));
+ Interpreter::TfLiteDelegatePtr tflite_delegate(
+ delegate.release(), [](TfLiteDelegate* delegate) {
+ delete reinterpret_cast<Delegate*>(delegate);
+ });
+ return interpreter->ModifyGraphWithDelegate(std::move(tflite_delegate));
}
protected: