From 4429dab3c277ac7b230efc1c293204874f5a286c Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Thu, 27 Apr 2023 12:02:08 +0100 Subject: IVGCVSW-7528 Update Arm NN documentation to reflect use of Tensorflow 2.12 Signed-off-by: Nikhil Raj Change-Id: Ib3aaba6d2bbe52978fc3e8873c78e4c2989131ed --- BuildGuideAndroidNDK.md | 2 +- samples/ObjectDetection/Readme.md | 4 ++-- scripts/build_android_ndk_guide.sh | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/BuildGuideAndroidNDK.md b/BuildGuideAndroidNDK.md index d93d4d4b84..b42e7e8916 100644 --- a/BuildGuideAndroidNDK.md +++ b/BuildGuideAndroidNDK.md @@ -167,7 +167,7 @@ First clone tensorflow: cd $WORKING_DIR git clone https://github.com/tensorflow/tensorflow.git cd tensorflow -git fetch && git checkout "tags/v2.10.0" +git fetch && git checkout "6f692f73cb2043b4a0b0446539cd8c15b3dd9220" ``` Arm NN provides a script that downloads the version of Tensorflow that Arm NN was tested with: ```bash diff --git a/samples/ObjectDetection/Readme.md b/samples/ObjectDetection/Readme.md index 4a119e5266..87a38b3ff7 100644 --- a/samples/ObjectDetection/Readme.md +++ b/samples/ObjectDetection/Readme.md @@ -106,13 +106,13 @@ For implementation details see the scripts FindTfLite.cmake and FindTfLiteSrc.cm The application links with the Tensorflow lite library libtensorflow-lite.a -#### Download and build Tensorflow Lite version 2.10 +#### Download and build Tensorflow Lite version. We currently use Tf 2.12 SHA which has a fix for the Cmake build. Example for Tensorflow Lite native compilation ```commandline sudo apt install build-essential git clone https://github.com/tensorflow/tensorflow.git cd tensorflow/tensorflow -git checkout 359c3cdfc5fabac82b3c70b3b6de2b0a8c16874f #Tensorflow 2.10 +git checkout 6f692f73cb2043b4a0b0446539cd8c15b3dd9220 mkdir build && cd build cmake ../lite -DTFLITE_ENABLE_XNNPACK=OFF make diff --git a/scripts/build_android_ndk_guide.sh b/scripts/build_android_ndk_guide.sh index a7fd674bfa..7f7621862e 100755 --- a/scripts/build_android_ndk_guide.sh +++ b/scripts/build_android_ndk_guide.sh @@ -210,7 +210,7 @@ function GetAndBuildComputeLibrary { } function GetAndBuildTFLite { - TENSORFLOW_REVISION="tags/v2.10.0" # Release 2.10.0 tag + TENSORFLOW_REVISION="6f692f73cb2043b4a0b0446539cd8c15b3dd9220" # TF r2.12 + PR #60015 to fix Cmake build. TFLITE_ROOT_DIR=${WORKING_DIR}/tensorflow/tensorflow/lite cd $WORKING_DIR @@ -231,7 +231,10 @@ function GetAndBuildTFLite { cd $WORKING_DIR fi - CMARGS="-DTFLITE_ENABLE_XNNPACK=OFF" + CMARGS="-DTFLITE_ENABLE_XNNPACK=OFF \ + -DFLATBUFFERS_BUILD_FLATC=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DBUILD_TESTING=OFF" # Two different naming conventions; one for build and the other for CC_OPT_FLAGS ANDROID_ARM_ARCH="arm64-v8a" @@ -303,7 +306,8 @@ function BuildArmNN { -DBUILD_ARMNN_TFLITE_DELEGATE=1 \ -DTENSORFLOW_ROOT=$WORKING_DIR/tensorflow \ -DTFLITE_LIB_ROOT=$WORKING_DIR/tflite-out/android \ - -DTFLITE_ROOT_DIR=$WORKING_DIR/tensorflow/tensorflow/lite" + -DTFLITE_ROOT_DIR=$WORKING_DIR/tensorflow/tensorflow/lite \ + -DBUILD_DELEGATE_JNI_INTERFACE=0" fi if [[ $DYNAMIC_SAMPLE == 1 ]]; then -- cgit v1.2.1