blob: 8c589702944578061892ca1852e1de9e2eccab5b [file] [log] [blame]
diff --git a/tensorflow/lite/BUILD b/tensorflow/lite/BUILD
index 72a46e66..c0b1cd16 100644
--- a/tensorflow/lite/BUILD
+++ b/tensorflow/lite/BUILD
@@ -348,6 +348,8 @@ cc_library(
":string",
":type_to_tflitetype",
":util",
+ "//tensorflow/lite/delegates/nnapi:nnapi_delegate",
+ "//tensorflow/lite/nnapi:nnapi_implementation",
"//tensorflow/lite/c:common",
"//tensorflow/lite/core/api",
"//tensorflow/lite/core/api:verifier",
diff --git a/tensorflow/lite/tools/evaluation/utils.cc b/tensorflow/lite/tools/evaluation/utils.cc
index ec09394e..0ce47fcb 100644
--- a/tensorflow/lite/tools/evaluation/utils.cc
+++ b/tensorflow/lite/tools/evaluation/utils.cc
@@ -94,25 +94,17 @@ TfLiteStatus GetSortedFileNames(
#endif
TfLiteDelegatePtr CreateNNAPIDelegate() {
-#if defined(__ANDROID__)
return TfLiteDelegatePtr(
NnApiDelegate(),
// NnApiDelegate() returns a singleton, so provide a no-op deleter.
[](TfLiteDelegate*) {});
-#else
- return CreateNullDelegate();
-#endif // defined(__ANDROID__)
}
TfLiteDelegatePtr CreateNNAPIDelegate(StatefulNnApiDelegate::Options options) {
-#if defined(__ANDROID__)
return TfLiteDelegatePtr(
new StatefulNnApiDelegate(options), [](TfLiteDelegate* delegate) {
delete reinterpret_cast<StatefulNnApiDelegate*>(delegate);
});
-#else
- return CreateNullDelegate();
-#endif // defined(__ANDROID__)
}
#if TFLITE_SUPPORTS_GPU_DELEGATE