From 590f3f7e0a792ca12ba9e30f59acd6aeafdd48d4 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 2 Dec 2020 10:20:48 +0000 Subject: IVGCVSW-5598 ArmNN Doxygen doc needs update Signed-off-by: James Ward Change-Id: Iac19640fec7aabdfcbb88a0856d4fce3a15d3f27 --- docs/00_introduction.dox | 75 +++++++++++++++---------------------- docs/01_parsers.dox | 20 ++++++++++ docs/02_deserializer_serializer.dox | 11 +++++- 3 files changed, 61 insertions(+), 45 deletions(-) (limited to 'docs') diff --git a/docs/00_introduction.dox b/docs/00_introduction.dox index 66006405f5..6153b03fa7 100644 --- a/docs/00_introduction.dox +++ b/docs/00_introduction.dox @@ -176,36 +176,20 @@ All downloaded or generated files will be saved inside the `~/armnn-devenv` dire cd ~/armnn-devenv/toolchains #For Mac OS, change the NDK download link accordingly. - wget https://dl.google.com/android/repository/android-ndk-r17b-linux-x86_64.zip - unzip android-ndk-r17b-linux-x86_64.zip - export NDK=~/armnn-devenv/toolchains/android-ndk-r17b + wget https://dl.google.com/android/repository/android-ndk-r20b-linux-x86_64.zip + unzip android-ndk-r20b-linux-x86_64.zip + export NDK=~/armnn-devenv/toolchains/android-ndk-r20b ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - You may want to append `export NDK=~/armnn-devenv/toolchains/android-ndk-r17b` to your `~/.bashrc` (or `~/.bash_profile` in Mac OS). - -### Make a standalone toolchain: - - (Requires python if not previously installed: `sudo apt install python`) - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh - - # Create an arm64 API 26 libc++ toolchain. - $NDK/build/tools/make_standalone_toolchain.py \ - --arch arm64 \ - --api 26 \ - --stl=libc++ \ - --install-dir=$HOME/armnn-devenv/toolchains/aarch64-android-r17b - export PATH=$HOME/armnn-devenv/toolchains/aarch64-android-r17b/bin:$PATH - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - You may want to append `export PATH=$HOME/armnn-devenv/toolchains/aarch64-android-r17b/bin:$PATH` to your `~/.bashrc` (or `~/.bash_profile` in Mac OS). + You may want to append `export NDK=~/armnn-devenv/toolchains/android-ndk-r20b` to your `~/.bashrc` (or `~/.bash_profile` in Mac OS). ## Build the Boost C++ libraries ### Download Boost version 1.64: +#### Note: as of ArmNN version 20.11, Boost is no longer required to build the core ArmNN code. Boost is, however, still required to build the unit tests. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh mkdir ~/armnn-devenv/boost cd ~/armnn-devenv/boost @@ -258,11 +242,11 @@ All downloaded or generated files will be saved inside the `~/armnn-devenv` dire ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh - mkdir ~/armnn-devenv/google + mkdir -p ~/armnn-devenv/google cd ~/armnn-devenv/google git clone https://github.com/google/protobuf.git cd protobuf - git checkout -b v3.5.2 v3.5.2 + git checkout -b v3.12.0 v3.12.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -306,12 +290,10 @@ 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 a0043f9262dc1b0e7dc4bdf3a7f0ef0bebc4891e + git checkout fcc4b966f1265f466e82617020af93670141b009 # Tensorflow version 2.3.1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - 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. - ## Build ArmNN ### Clone ArmNN source code: @@ -337,25 +319,30 @@ All downloaded or generated files will be saved inside the `~/armnn-devenv` dire (Requires CMake if not previously installed: `sudo apt install cmake`) + Note: please specify the ANDROID_API version. + e.g. for version 27 `export ANDROID_API=27` + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh mkdir ~/armnn-devenv/armnn/build cd ~/armnn-devenv/armnn/build - CXX=aarch64-linux-android-clang++ \ - CC=aarch64-linux-android-clang \ + CXX=aarch64-linux-android${ANDROID_API}-clang++ \ + CC=aarch64-linux-android${ANDROID_API}-clang \ CXX_FLAGS="-fPIE -fPIC" \ cmake .. \ + -DCMAKE_ANDROID_NDK=$NDK \ -DCMAKE_SYSTEM_NAME=Android \ + -DCMAKE_SYSTEM_VERSION=$ANDROID_API \ -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \ - -DCMAKE_ANDROID_STANDALONE_TOOLCHAIN=$HOME/armnn-devenv/toolchains/aarch64-android-r17b/ \ - -DCMAKE_EXE_LINKER_FLAGS="-pie -llog" \ + -DCMAKE_SYSROOT=$HOME/android-ndk-r20b/toolchains/llvm/prebuilt/linux-x86_64/sysroot \ + -DCMAKE_EXE_LINKER_FLAGS="-pie -llog -lz" \ -DARMCOMPUTE_ROOT=$HOME/armnn-devenv/ComputeLibrary/ \ -DARMCOMPUTE_BUILD_DIR=$HOME/armnn-devenv/ComputeLibrary/build \ -DBOOST_ROOT=$HOME/armnn-devenv/boost/install/ \ -DARMCOMPUTENEON=1 -DARMCOMPUTECL=1 -DARMNNREF=1 \ -DTF_GENERATED_SOURCES=$HOME/armnn-devenv/google/tf_pb/ -DBUILD_TF_PARSER=1 \ -DPROTOBUF_ROOT=$HOME/armnn-devenv/google/arm64_pb_install/ - make -j16 + make -j16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -371,9 +358,9 @@ All downloaded or generated files will be saved inside the `~/armnn-devenv` dire adb push libarmnn.so /data/local/tmp/ adb push UnitTests /data/local/tmp/ adb push $NDK/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so /data/local/tmp/ - adb push $HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so /data/local/tmp/libprotobuf.so.15.0.1 - adb shell 'ln -s libprotobuf.so.15.0.1 /data/local/tmp/libprotobuf.so.15' - adb shell 'ln -s libprotobuf.so.15.0.1 /data/local/tmp/libprotobuf.so' + adb push $HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so /data/local/tmp/libprotobuf.so.3.12.0.0 + adb shell 'ln -s libprotobuf.so.23.0.0 /data/local/tmp/libprotobuf.so.23' + adb shell 'ln -s libprotobuf.so.23.0.0 /data/local/tmp/libprotobuf.so' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -458,14 +445,14 @@ The instructions show how to build the ArmNN core library and the Boost, Protobu ## Build and install Google's Protobuf library -### Get protobuf-all-3.5.1.tar.gz from [here](https://github.com/protocolbuffers/protobuf/releases/tag/v3.5.1). +### Get protobuf-all-3.12.0.tar.gz from [here](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.0). ### Extract: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh - tar -zxvf protobuf-all-3.5.1.tar.gz - cd protobuf-3.5.1 + tar -zxvf protobuf-all-3.12.0.tar.gz + cd protobuf-3.12.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -614,8 +601,8 @@ The instructions show how to build the ArmNN core library and the Boost, Protobu -DCAFFE_GENERATED_SOURCES=$HOME/armnn-devenv/caffe/build/src \ -DBUILD_CAFFE_PARSER=1 \ -DPROTOBUF_ROOT=$HOME/armnn-devenv/google/x86_64_pb_install/ \ - -DPROTOBUF_LIBRARY_DEBUG=$HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so.15.0.1 \ - -DPROTOBUF_LIBRARY_RELEASE=$HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so.15.0.1 + -DPROTOBUF_LIBRARY_DEBUG=$HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so.23.0.0 \ + -DPROTOBUF_LIBRARY_RELEASE=$HOME/armnn-devenv/google/arm64_pb_install/lib/libprotobuf.so.23.0.0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -631,7 +618,7 @@ The instructions show how to build the ArmNN core library and the Boost, Protobu ### Copy the build folder to an arm64 linux machine -### Copy the libprotobuf.so.15.0.1 library file to the build folder +### Copy the libprotobuf.so.23.0.0 library file to the build folder ### cd to the build folder on your arm64 machine and set your LD_LIBRARY_PATH to its current location: @@ -642,11 +629,11 @@ The instructions show how to build the ArmNN core library and the Boost, Protobu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -### Create a symbolic link to libprotobuf.so.15.0.1: +### Create a symbolic link to libprotobuf.so.23.0.0: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh - ln -s libprotobuf.so.15.0.1 ./libprotobuf.so.15 + ln -s libprotobuf.so.23.0.0 ./libprotobuf.so.23 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -728,7 +715,7 @@ The instructions show how to build the ArmNN core library and the Boost, Protobu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.sh - /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: warning: libz.so.1, needed by /home//armNN/usr/lib64/libprotobuf.so.15.0.0, not found (try using -rpath or -rpath-link) + /usr/lib/gcc-cross/aarch64-linux-gnu/5/../../../../aarch64-linux-gnu/bin/ld: warning: libz.so.1, needed by /home//armNN/usr/lib64/libprotobuf.so.23.0.0, not found (try using -rpath or -rpath-link) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/01_parsers.dox b/docs/01_parsers.dox index 1c52c4a53b..1af2503f88 100644 --- a/docs/01_parsers.dox +++ b/docs/01_parsers.dox @@ -44,6 +44,7 @@ This reference guide provides a list of Caffe layers the Arm NN SDK currently su - Yolov1_tiny. - Lenet. - MobileNetv1. +- SqueezeNet v1.0 and SqueezeNet v1.1 ## The Arm NN SDK supports the following machine learning layers for Caffe networks: @@ -157,6 +158,7 @@ The Arm NN SDK TensorFlow Lite parser currently supports the following operators - CONCATENATION, Supported Fused Activation: RELU , RELU6 , TANH, NONE - CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE - DEPTHWISE_CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE +- DEQUANTIZE - DIV - EXP - FULLY_CONNECTED, Supported Fused Activation: RELU , RELU6 , TANH, NONE @@ -171,10 +173,12 @@ The Arm NN SDK TensorFlow Lite parser currently supports the following operators - NEG - PACK - PAD +- QUANTIZE - RELU - RELU6 - RESHAPE - RESIZE_BILINEAR +- RESIZE_NEAREST_NEIGHBOR - SLICE - SOFTMAX - SPACE_TO_BATCH @@ -199,6 +203,15 @@ Arm tested these operators with the following TensorFlow Lite neural network: - [Quantized SSD MobileNet](http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_quantized_300x300_coco14_sync_2018_07_18.tar.gz) - DeepSpeech v1 converted from [TensorFlow model](https://github.com/mozilla/DeepSpeech/releases/tag/v0.4.1) - DeepSpeaker +- [DeepLab v3+](https://www.tensorflow.org/lite/models/segmentation/overview) +- FSRCNN +- EfficientNet-lite +- RDN converted from [TensorFlow model](https://github.com/hengchuan/RDN-TensorFlow) +- Quantized RDN (CpuRef) +- [Quantized Inception v3](http://download.tensorflow.org/models/tflite_11_05_08/inception_v3_quant.tgz) +- [Quantized Inception v4](http://download.tensorflow.org/models/inception_v4_299_quant_20181026.tgz) (CpuRef) +- Quantized ResNet v2 50 (CpuRef) +- Quantized Yolo v3 (CpuRef) More machine learning operators will be supported in future releases.



@@ -251,6 +264,8 @@ The Arm NN SDK TensorFlow parser currently only supports fp32 operators. - See the TensorFlow [squeeze documentation](https://www.tensorflow.org/api_docs/python/tf/squeeze) for more information. - tanh - See the TensorFlow [tanh documentation](https://www.tensorflow.org/api_docs/python/tf/tanh) for more information. +- transpose + - See the TensorFlow [transpose documentation](https://www.tensorflow.org/api_docs/python/tf/transpose) for more information. ## Partially supported @@ -283,6 +298,8 @@ The Arm NN SDK TensorFlow parser currently only supports fp32 operators. - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of 4D and 1D tensors. See the TensorFlow [minimum operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/minimum) for more information. - multiply - The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [multiply documentation](https://www.tensorflow.org/api_docs/python/tf/multiply) for more information. +- pack/stack + - See the TensorFlow [stack documentation](https://www.tensorflow.org/api_docs/python/tf/stack) for more information. - pad - Only supports tf.pad function with mode = 'CONSTANT' and constant_values = 0. See the TensorFlow [pad documentation](https://www.tensorflow.org/api_docs/python/tf/pad) for more information. - realdiv @@ -295,9 +312,12 @@ The Arm NN SDK TensorFlow parser currently only supports fp32 operators. - The parser only supports 2D inputs and does not support selecting the `softmax` dimension. See the TensorFlow [softmax documentation](https://www.tensorflow.org/api_docs/python/tf/nn/softmax) for more information. - split - Arm NN supports split along the channel dimension for data formats NHWC and NCHW. +- strided_slice + - See the TensorFlow [strided_slice documentation](https://www.tensorflow.org/api_docs/python/tf/strided_slice) for more information. - subtract - The parser does not support all forms of broadcasting [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting), only broadcasting of scalars and 1D tensors. See the TensorFlow [subtract documentation](https://www.tensorflow.org/api_docs/python/tf/math/subtract) for more information. + ## Tested networks Arm tests these operators with the following TensorFlow fp32 neural networks: diff --git a/docs/02_deserializer_serializer.dox b/docs/02_deserializer_serializer.dox index 0bd677eb88..d192ec4e04 100644 --- a/docs/02_deserializer_serializer.dox +++ b/docs/02_deserializer_serializer.dox @@ -60,6 +60,7 @@ The Arm NN SDK Serializer currently supports the following layers: - Input - InstanceNormalization - L2Normalization +- Logical - LogSoftmax - Lstm - Maximum @@ -73,8 +74,10 @@ The Arm NN SDK Serializer currently supports the following layers: - Permute - Pooling2d - Prelu +- QLstm - Quantize - QuantizedLstm +- Rank - Reshape - Resize - Slice @@ -87,6 +90,7 @@ The Arm NN SDK Serializer currently supports the following layers: - StridedSlice - Subtraction - Switch +- Transpose - TransposeConvolution2d More machine learning layers will be supported in future releases. @@ -131,12 +135,15 @@ The Arm NN SDK Deserialize parser currently supports the following layers: - Dequantize - DetectionPostProcess - Division +- ElementwiseUnary +- Fill - Floor - FullyConnected - Gather - Input - InstanceNormalization - L2Normalization +- Logical - LogSoftmax - Lstm - Maximum @@ -150,9 +157,12 @@ The Arm NN SDK Deserialize parser currently supports the following layers: - Permute - Pooling2d - Prelu +- QLstm - Quantize - QuantizedLstm +- Rank - Reshape +- Resize - Rsqrt - Slice - Softmax @@ -165,7 +175,6 @@ The Arm NN SDK Deserialize parser currently supports the following layers: - Subtraction - Switch - TransposeConvolution2d -- Resize More machine learning layers will be supported in future releases. -- cgit v1.2.1