diff options
-rw-r--r-- | BuildGuideAndroidNDK.md | 4 | ||||
-rwxr-xr-x | scripts/generate_tensorflow_protobuf.sh | 28 |
2 files changed, 10 insertions, 22 deletions
diff --git a/BuildGuideAndroidNDK.md b/BuildGuideAndroidNDK.md index 79de1fcf58..beeadd4922 100644 --- a/BuildGuideAndroidNDK.md +++ b/BuildGuideAndroidNDK.md @@ -137,11 +137,9 @@ All downloaded or generated files will be saved inside the `~/armnn-devenv` dire cd ~/armnn-devenv/google/ git clone https://github.com/tensorflow/tensorflow.git cd tensorflow/ - git checkout 590d6eef7e91a6a7392c8ffffb7b58f2e0c8bc6b + git checkout fcc4b966f1265f466e82617020af93670141b009 ``` - You need tensorflow/contrib/makefile/tf_proto_files.txt from TensorFlow to generate TensorFlow protobuf definitions. This file is not available in TensorFlow master branch. - #### <a name="buildArmNN">Build ArmNN</a> * Clone ArmNN source code: diff --git a/scripts/generate_tensorflow_protobuf.sh b/scripts/generate_tensorflow_protobuf.sh index df0d7bad86..36fffc0846 100755 --- a/scripts/generate_tensorflow_protobuf.sh +++ b/scripts/generate_tensorflow_protobuf.sh @@ -52,22 +52,12 @@ then exit 1 fi - -TF_PROTO_FILES=tensorflow/contrib/makefile/tf_proto_files.txt -if [ -r $TF_PROTO_FILES ] -then - OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH - for i in `cat $TF_PROTO_FILES` - do - LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:${PROTOBUF_INSTALL_DIR}/lib \ - $PROTOBUF_INSTALL_DIR/bin/protoc $i \ - --proto_path=. \ - --proto_path=${PROTOBUF_INSTALL_DIR}/include \ - --cpp_out $OUTPUT_DIR - done -else - echo "Couldn't find $TF_PROTO_FILES. This script should be run from the" - echo "tensorflow source directory." - exit 1 -fi - +OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH +#hardware_types.proto and autotuning.proto not required +find tensorflow -type f -name '*.proto' | grep -v autotuning | grep -v hardware_types | while read i; do + LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH:${PROTOBUF_INSTALL_DIR}/lib $PROTOBUF_INSTALL_DIR/bin/protoc $i \ + --proto_path=. \ + --proto_path=${PROTOBUF_INSTALL_DIR}/include \ + --cpp_out $OUTPUT_DIR + AssertZeroExitCode "Failed to make proto files" +done
\ No newline at end of file |