Update Android Model Benchmark Tool to support Flex delegate

Also updated README.md

PiperOrigin-RevId: 324157303
Change-Id: I40bd6fbac0c5aafa12a3867ab2161879df494fee
This commit is contained in:
Terry Heo 2020-07-30 23:09:01 -07:00 committed by TensorFlower Gardener
parent f6cc28bda0
commit 3f576ef723
2 changed files with 4 additions and 0 deletions

View File

@ -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",
],

View File

@ -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]