From 3f576ef7234788f0154bd7f4c25bba2ab952af95 Mon Sep 17 00:00:00 2001 From: Terry Heo Date: Thu, 30 Jul 2020 23:09:01 -0700 Subject: [PATCH] Update Android Model Benchmark Tool to support Flex delegate Also updated README.md PiperOrigin-RevId: 324157303 Change-Id: I40bd6fbac0c5aafa12a3867ab2161879df494fee --- tensorflow/lite/tools/benchmark/android/BUILD | 1 + tensorflow/lite/tools/benchmark/android/README.md | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tensorflow/lite/tools/benchmark/android/BUILD b/tensorflow/lite/tools/benchmark/android/BUILD index 6645b730bac..16c1b59dfd4 100644 --- a/tensorflow/lite/tools/benchmark/android/BUILD +++ b/tensorflow/lite/tools/benchmark/android/BUILD @@ -37,6 +37,7 @@ tflite_jni_binary( "jni/**/*.h", ]), deps = [ + "//tensorflow/lite/delegates/flex:delegate", "//tensorflow/lite/java/jni", "//tensorflow/lite/tools/benchmark:benchmark_tflite_model_lib", ], diff --git a/tensorflow/lite/tools/benchmark/android/README.md b/tensorflow/lite/tools/benchmark/android/README.md index f73939c96bf..57c7f1f23b8 100644 --- a/tensorflow/lite/tools/benchmark/android/README.md +++ b/tensorflow/lite/tools/benchmark/android/README.md @@ -27,9 +27,12 @@ to edit the `WORKSPACE` to configure the android NDK/SDK. ``` bazel build -c opt \ + --config=monolithic \ --config=android_arm64 \ + --cxxopt='--std=c++14' \ tensorflow/lite/tools/benchmark/android:benchmark_model ``` +Note: "--config=monolithic" was added to support TF ops via [Flex delegate](https://www.tensorflow.org/lite/guide/ops_select). (Optional) To enable Hexagon delegate with `--use_hexagon=true` option, you can download and install the libraries as the guided in [hexagon delegate]