From 31a7c890207f80afc866f706d797267d78d05a0d Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Fri, 29 Jan 2021 14:18:13 +0000 Subject: IVGCVSW-5605 Doxygen: Add the TfLite Delegate to Doxygen docu * Moves TensorFlowLiteDelegateSupport.md to doxygen * Renames a few .dox files to represent the structure of the documentation * Adds sections for build and use guides * Integrates markdown guides for the delegate into doxygen Signed-off-by: Jan Eilers Change-Id: I68b7a29239be88c0617da9bdfce5323ebf26f5bc --- docs/00_software_tools.dox | 56 ------ docs/01_00_software_tools.dox | 58 ++++++ docs/01_01_parsers.dox | 328 +++++++++++++++++++++++++++++++ docs/01_02_deserializer_serializer.dox | 174 +++++++++++++++++ docs/01_03_delegate.dox | 144 ++++++++++++++ docs/01_parsers.dox | 339 --------------------------------- docs/02_build_guides.dox | 26 +++ docs/02_deserializer_serializer.dox | 192 ------------------- docs/03_use_guides.dox | 21 ++ docs/Doxyfile | 11 +- 10 files changed, 759 insertions(+), 590 deletions(-) delete mode 100644 docs/00_software_tools.dox create mode 100644 docs/01_00_software_tools.dox create mode 100644 docs/01_01_parsers.dox create mode 100644 docs/01_02_deserializer_serializer.dox create mode 100644 docs/01_03_delegate.dox delete mode 100644 docs/01_parsers.dox create mode 100644 docs/02_build_guides.dox delete mode 100644 docs/02_deserializer_serializer.dox create mode 100644 docs/03_use_guides.dox (limited to 'docs') diff --git a/docs/00_software_tools.dox b/docs/00_software_tools.dox deleted file mode 100644 index e71b3dc332..0000000000 --- a/docs/00_software_tools.dox +++ /dev/null @@ -1,56 +0,0 @@ -/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. -/// -/// SPDX-License-Identifier: MIT -/// - -namespace armnn -{ -/** -@page swtools Software Tools - -On this page you can find all software tools contained in the ArmNN repository. You will find links to how-to guides and -other helpful information in each section. - -@subpage parsers - -@subpage md_python_pyarmnn_README - -@subpage serializer - -@subpage deserializer - -@subpage md_src_armnnQuantizer_README - -@subpage md_src_armnnConverter_README - -@subpage md_tests_ImageCSVFileGenerator_README - -@subpage md_tests_ImageTensorGenerator_README - -@subpage md_tests_ModelAccuracyTool-Armnn_README -**/ -} - - -/// Create pages for each tool so they appear nicely in the doxygen tree-view. Subpages are not listed there. -/// -/// Note: The parser, serializer and deserializer pages are created in 01_parsers.dox or 02_deserializer_serializer.dox -namespace armnn -{ -/** - -@page md_python_pyarmnn_README PyArmNN - -@page md_src_armnnQuantizer_README Quantizer - -@page md_src_armnnConverter_README Converter - -@page md_tests_ModelAccuracyTool-Armnn_README ModelAccuracyTool - -@page md_tests_ImageCSVFileGenerator_README ImageCSVFileGenerator - -@page md_tests_ImageTensorGenerator_README ImageTensorGenerator - -**/ -} - diff --git a/docs/01_00_software_tools.dox b/docs/01_00_software_tools.dox new file mode 100644 index 0000000000..416e2265bb --- /dev/null +++ b/docs/01_00_software_tools.dox @@ -0,0 +1,58 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page swtools Software Tools + +On this page you can find all software tools contained in the Arm NN repository. You will find links to how-to guides and +other helpful information in each section. + +@subpage delegate + +@subpage parsers + +@subpage md_python_pyarmnn_README + +@subpage serializer + +@subpage deserializer + +@subpage md_src_armnnQuantizer_README + +@subpage md_src_armnnConverter_README + +@subpage md_tests_ImageCSVFileGenerator_README + +@subpage md_tests_ImageTensorGenerator_README + +@subpage md_tests_ModelAccuracyTool-Armnn_README +**/ +} + + +/// Create pages for each tool so they appear nicely in the doxygen tree-view. Subpages are not listed there. +/// +/// Note: The parser, serializer and deserializer pages are created in 01_parsers.dox or 02_deserializer_serializer.dox +namespace armnn +{ +/** + +@page md_python_pyarmnn_README PyArmNN + +@page md_src_armnnQuantizer_README Quantizer + +@page md_src_armnnConverter_README Converter + +@page md_tests_ModelAccuracyTool-Armnn_README ModelAccuracyTool + +@page md_tests_ImageCSVFileGenerator_README ImageCSVFileGenerator + +@page md_tests_ImageTensorGenerator_README ImageTensorGenerator + +**/ +} + diff --git a/docs/01_01_parsers.dox b/docs/01_01_parsers.dox new file mode 100644 index 0000000000..20d0ced209 --- /dev/null +++ b/docs/01_01_parsers.dox @@ -0,0 +1,328 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page parsers Parsers + +@tableofcontents +Execute models from different machine learning platforms efficiently with our parsers. Simply choose a parser according +to the model you want to run e.g. If you've got a model in tensorflow format (.pb) use our tensorflow-parser. + +If you would like to run a Tensorflow Lite (TfLite) model you probably also want to take a look at our [TfLite delegate](delegate). + +All parsers are written in C++ but it is also possible to use them in python. For more information on our python +bindings take a look into the [PyArmNN](pyarmnn) section. + +Fallback mechanism + +@section S4_caffe_parser ArmNN Caffe Parser + +`armnnCaffeParser` is a library for loading neural networks defined in Caffe protobuf files into the Arm NN runtime. + +## Caffe layers supported by the Arm NN SDK +This reference guide provides a list of Caffe layers the Arm NN SDK currently supports. + +## Although some other neural networks might work, Arm tests the Arm NN SDK with Caffe implementations of the following neural networks: + +- AlexNet. +- Cifar10. +- Inception-BN. +- Resnet_50, Resnet_101 and Resnet_152. +- VGG_CNN_S, VGG_16 and VGG_19. +- Yolov1_tiny. +- Lenet. +- MobileNetv1. +- SqueezeNet v1.0 and SqueezeNet v1.1 + +## The Arm NN SDK supports the following machine learning layers for Caffe networks: + +- BatchNorm, in inference mode. +- Convolution, excluding the Dilation Size, Weight Filler, Bias Filler, Engine, Force nd_im2col, and Axis parameters. + Caffe doesn't support depthwise convolution, the equivalent layer is implemented through the notion of groups. ArmNN supports groups this way: + - when group=1, it is a normal conv2d + - when group=#input_channels, we can replace it by a depthwise convolution + - when group>1 && group<#input_channels, we need to split the input into the given number of groups, apply a separate convolution and then merge the results +- Concat, along the channel dimension only. +- Dropout, in inference mode. +- Element wise, excluding the coefficient parameter. +- Inner Product, excluding the Weight Filler, Bias Filler, Engine, and Axis parameters. +- Input. +- Local Response Normalisation (LRN), excluding the Engine parameter. +- Pooling, excluding the Stochastic Pooling and Engine parameters. +- ReLU. +- Scale. +- Softmax, excluding the Axis and Engine parameters. +- Split. + +More machine learning layers will be supported in future releases. + +Please note that certain deprecated Caffe features are not supported by the armnnCaffeParser. If you think that Arm NN should be able to load your model according to the list of supported layers, but you are getting strange error messages, then try upgrading your model to the latest format using Caffe, either by saving it to a new file or using the upgrade utilities in `caffe/tools`. +



+ +@section S5_onnx_parser ArmNN Onnx Parser + +`armnnOnnxParser` is a library for loading neural networks defined in ONNX protobuf files into the Arm NN runtime. + +## ONNX operators that the Arm NN SDK supports + +This reference guide provides a list of ONNX operators the Arm NN SDK currently supports. + +The Arm NN SDK ONNX parser currently only supports fp32 operators. + +## Fully supported + +- Add + - See the ONNX [Add documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Add) for more information + +- AveragePool + - See the ONNX [AveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#AveragePool) for more information. + +- Constant + - See the ONNX [Constant documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Constant) for more information. + +- Clip + - See the ONNX [Clip documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Clip) for more information. + +- Flatten + - See the ONNX [Flatten documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Flatten) for more information. + +- GlobalAveragePool + - See the ONNX [GlobalAveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GlobalAveragePool) for more information. + +- LeakyRelu + - See the ONNX [LeakyRelu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu) for more information. + +- MaxPool + - See the ONNX [max_pool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxPool) for more information. + +- Relu + - See the ONNX [Relu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Relu) for more information. + +- Reshape + - See the ONNX [Reshape documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Reshape) for more information. + +- Sigmoid + - See the ONNX [Sigmoid documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Sigmoid) for more information. + +- Tanh + - See the ONNX [Tanh documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Tanh) for more information. + + +## Partially supported + +- Conv + - The parser only supports 2D convolutions with a dilation rate of [1, 1] and group = 1 or group = #Nb_of_channel (depthwise convolution) + See the ONNX [Conv documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Conv) for more information. +- BatchNormalization + - The parser does not support training mode. See the ONNX [BatchNormalization documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BatchNormalization) for more information. +- MatMul + - The parser only supports constant weights in a fully connected layer. + +## Tested networks + +Arm tested these operators with the following ONNX fp32 neural networks: +- Simple MNIST. See the ONNX [MNIST documentation](https://github.com/onnx/models/tree/master/mnist) for more information. +- Mobilenet_v2. See the ONNX [MobileNet documentation](https://github.com/onnx/models/tree/master/models/image_classification/mobilenet) for more information. + +More machine learning operators will be supported in future releases. +



+ +@section S6_tf_lite_parser ArmNN Tf Lite Parser + +`armnnTfLiteParser` is a library for loading neural networks defined by TensorFlow Lite FlatBuffers files +into the Arm NN runtime. + +## TensorFlow Lite operators that the Arm NN SDK supports + +This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports. + +## Fully supported + +The Arm NN SDK TensorFlow Lite parser currently supports the following operators: + +- ADD +- AVERAGE_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE +- BATCH_TO_SPACE +- 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 +- LOGISTIC +- L2_NORMALIZATION +- LEAKY_RELU +- MAX_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE +- MAXIMUM +- MEAN +- MINIMUM +- MUL +- NEG +- PACK +- PAD +- QUANTIZE +- RELU +- RELU6 +- RESHAPE +- RESIZE_BILINEAR +- RESIZE_NEAREST_NEIGHBOR +- SLICE +- SOFTMAX +- SPACE_TO_BATCH +- SPLIT +- SPLIT_V +- SQUEEZE +- STRIDED_SLICE +- SUB +- TANH +- TRANSPOSE +- TRANSPOSE_CONV +- UNPACK + +## Custom Operator + +- TFLite_Detection_PostProcess + +## Tested networks + +Arm tested these operators with the following TensorFlow Lite neural network: +- [Quantized MobileNet](http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224_quant.tgz) +- [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. +



+ +@section S7_tf_parser ArmNN Tensorflow Parser + +`armnnTfParser` is a library for loading neural networks defined by TensorFlow protobuf files into the Arm NN runtime. + +## TensorFlow operators that the Arm NN SDK supports + +This reference guide provides a list of TensorFlow operators the Arm NN SDK currently supports. + +The Arm NN SDK TensorFlow parser currently only supports fp32 operators. + +## Fully supported + +- avg_pool + - See the TensorFlow [avg_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/avg_pool) for more information. +- bias_add + - See the TensorFlow [bias_add documentation](https://www.tensorflow.org/api_docs/python/tf/nn/bias_add) for more information. +- conv2d + - See the TensorFlow [conv2d documentation](https://www.tensorflow.org/api_docs/python/tf/nn/conv2d) for more information. +- expand_dims + - See the TensorFlow [expand_dims documentation](https://www.tensorflow.org/api_docs/python/tf/expand_dims) for more information. +- gather + - See the TensorFlow [gather documentation](https://www.tensorflow.org/api_docs/python/tf/gather) for more information. +- identity + - See the TensorFlow [identity documentation](https://www.tensorflow.org/api_docs/python/tf/identity) for more information. +- local_response_normalization + - See the TensorFlow [local_response_normalization documentation](https://www.tensorflow.org/api_docs/python/tf/nn/local_response_normalization) for more information. +- max_pool + - See the TensorFlow [max_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/max_pool) for more information. +- placeholder + - See the TensorFlow [placeholder documentation](https://www.tensorflow.org/api_docs/python/tf/placeholder) for more information. +- reduce_mean + - See the TensorFlow [reduce_mean documentation](https://www.tensorflow.org/api_docs/python/tf/reduce_mean) for more information. +- relu + - See the TensorFlow [relu documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu) for more information. +- relu6 + - See the TensorFlow [relu6 documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu6) for more information. +- rsqrt + - See the TensorFlow [rsqrt documentation](https://www.tensorflow.org/api_docs/python/tf/math/rsqrt) for more information. +- shape + - See the TensorFlow [shape documentation](https://www.tensorflow.org/api_docs/python/tf/shape) for more information. +- sigmoid + - See the TensorFlow [sigmoid documentation](https://www.tensorflow.org/api_docs/python/tf/sigmoid) for more information. +- softplus + - See the TensorFlow [softplus documentation](https://www.tensorflow.org/api_docs/python/tf/nn/softplus) for more information. +- squeeze + - 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 + +- add + - 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 [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add) for more information. +- add_n + - 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 [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add_n) for more information. +- concat + - Arm NN supports concatenation along the channel dimension for data formats NHWC and NCHW. +- constant + - The parser does not support the optional `shape` argument. It always infers the shape of the output tensor from `value`. See the TensorFlow [constant documentation](https://www.tensorflow.org/api_docs/python/tf/constant) for further information. +- depthwise_conv2d_native + - The parser only supports a dilation rate of (1,1,1,1). See the TensorFlow [depthwise_conv2d_native documentation](https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d_native) for more information. +- equal + - 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 [equal operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/equal) for more information. +- fused_batch_norm + - The parser does not support training outputs. See the TensorFlow [fused_batch_norm documentation](https://www.tensorflow.org/api_docs/python/tf/nn/fused_batch_norm) for more information. +- greater + - 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 [greater operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/greater) for more information. +- matmul + - The parser only supports constant weights in a fully connected layer. See the TensorFlow [matmul documentation](https://www.tensorflow.org/api_docs/python/tf/matmul) for more information. +- maximum + where maximum is used in one of the following ways + - max(mul(a, x), x) + - max(mul(x, a), x) + - max(x, mul(a, x)) + - max(x, mul(x, a) + This is interpreted as a ActivationLayer with a LeakyRelu activation function. Any other usage of max will result in the insertion of a simple maximum layer. The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting). See the TensorFlow [maximum documentation](https://www.tensorflow.org/api_docs/python/tf/maximum) for more information. +- minimum + - 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 + - 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 [realdiv documentation](https://www.tensorflow.org/api_docs/python/tf/realdiv) for more information. +- reshape + - The parser does not support reshaping to or from 4D. See the TensorFlow [reshape documentation](https://www.tensorflow.org/api_docs/python/tf/reshape) for more information. +- resize_images + - The parser only supports `ResizeMethod.BILINEAR` with `align_corners=False`. See the TensorFlow [resize_images documentation](https://www.tensorflow.org/api_docs/python/tf/image/resize_images) for more information. +- softmax + - 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: +- Lenet +- mobilenet_v1_1.0_224. The Arm NN SDK only supports the non-quantized version of the network. See the [MobileNet_v1 documentation](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md) for more information on quantized networks. +- inception_v3. The Arm NN SDK only supports the official inception_v3 transformed model. See the TensorFlow documentation on [preparing models for mobile deployment](https://www.tensorflow.org/mobile/prepare_models) for more information on how to transform the inception_v3 network. + +Using these datasets: +- Cifar10 +- Simple MNIST. For more information check out the [tutorial](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/deploying-a-tensorflow-mnist-model-on-arm-nn) on the Arm Developer portal. + +More machine learning operators will be supported in future releases. + +**/ +} + diff --git a/docs/01_02_deserializer_serializer.dox b/docs/01_02_deserializer_serializer.dox new file mode 100644 index 0000000000..047cb5dc8d --- /dev/null +++ b/docs/01_02_deserializer_serializer.dox @@ -0,0 +1,174 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page serializer Serializer +@tableofcontents + +The `armnnSerializer` is a library for serializing an Arm NN network to a stream. + +@section serializersupport Supported Layers + +This reference guide provides a list of layers which can be serialized by the Arm NN SDK. + +@subsection serializersupportflully Fully supported + +The Arm NN SDK Serializer currently supports the following layers: + +- Activation +- Addition +- ArgMinMax +- BatchToSpaceNd +- BatchNormalization +- Comparison +- Concat +- Constant +- Convolution2d +- DepthToSpace +- DepthwiseConvolution2d +- Dequantize +- DetectionPostProcess +- Division +- ElementwiseUnary +- Fill +- Floor +- FullyConnected +- Gather +- Input +- InstanceNormalization +- L2Normalization +- Logical +- LogSoftmax +- Lstm +- Maximum +- Mean +- Merge +- Minimum +- Multiplication +- Normalization +- Output +- Pad +- Permute +- Pooling2d +- Prelu +- QLstm +- Quantize +- QuantizedLstm +- Rank +- Reshape +- Resize +- Slice +- Softmax +- SpaceToBatchNd +- SpaceToDepth +- Splitter +- Stack +- StandIn +- StridedSlice +- Subtraction +- Switch +- Transpose +- TransposeConvolution2d + +More machine learning layers will be supported in future releases. + +@subsection serializersupportdeprecated Deprecated layers + +Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: + +- Abs will deserialize as ElementwiseUnary +- Equal will deserialize as Comparison +- Greater will deserialize as Comparison +- Merger will deserialize as Concat +- ResizeBilinear will deserialize as Resize +- Rsqrt will deserialize as ElementwiseUnary +



+ +@page deserializer Deserializer +@tableofcontents + +The `armnnDeserializer` is a library for loading neural networks defined by Arm NN FlatBuffers files +into the Arm NN runtime. + +@section deserializersupport Supported Layers + +This reference guide provides a list of layers which can be deserialized by the Arm NN SDK. + +@subsection deserializersupportfully Fully supported + +The Arm NN SDK Deserialize parser currently supports the following layers: + +- Abs +- Activation +- Addition +- ArgMinMax +- BatchToSpaceNd +- BatchNormalization +- Concat +- Comparison +- Constant +- Convolution2d +- DepthToSpace +- DepthwiseConvolution2d +- Dequantize +- DetectionPostProcess +- Division +- ElementwiseUnary +- Fill +- Floor +- FullyConnected +- Gather +- Input +- InstanceNormalization +- L2Normalization +- Logical +- LogSoftmax +- Lstm +- Maximum +- Mean +- Merge +- Minimum +- Multiplication +- Normalization +- Output +- Pad +- Permute +- Pooling2d +- Prelu +- Quantize +- QLstm +- QuantizedLstm +- Rank +- Reshape +- Resize +- ResizeBilinear +- Rsqrt +- Slice +- Softmax +- SpaceToBatchNd +- SpaceToDepth +- Splitter +- Stack +- StandIn +- StridedSlice +- Subtraction +- Switch +- TransposeConvolution2d + +More machine learning layers will be supported in future releases. + +@subsection deserializersupportdeprecated Deprecated layers + +Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: + +- Equal will deserialize as Comparison +- Merger will deserialize as Concat +- Greater will deserialize as Comparison +- ResizeBilinear will deserialize as Resize + +**/ +} \ No newline at end of file diff --git a/docs/01_03_delegate.dox b/docs/01_03_delegate.dox new file mode 100644 index 0000000000..7c7763a923 --- /dev/null +++ b/docs/01_03_delegate.dox @@ -0,0 +1,144 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page delegate TfLite Delegate +@tableofcontents + + +@section delegateintro About the delegate +'armnnDelegate' is a library for accelerating certain TensorFlow Lite (TfLite) operators on Arm hardware. It can be +integrated in TfLite using its delegation mechanism. TfLite will then delegate the execution of operators supported by +Arm NN to Arm NN. + +The main difference to our @ref S6_tf_lite_parser is the amount of operators you can run with it. If none of the active +backends support an operation in your model you won't be able to execute it with our parser. In contrast to that, TfLite +only delegates operations to the armnnDelegate if it does support them and otherwise executes them itself. In other +words, every TfLite model can be executed and every operation in your model that we can accelerate will be accelerated. +That is the reason why the armnnDelegate is our recommended way to accelerate TfLite models. + +If you need help building the armnnDelegate, please take a look at our [build guide](delegate/BuildGuideNative.md). +An example how to setup TfLite to integrate the armnnDelegate can be found in this +guide: [Integrate the delegate into python](delegate/IntegrateDelegateIntoPython.md) + + +@section delegatesupport Supported Operators +This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports. + +@subsection delegatefullysupported Fully supported + +The Arm NN SDK TensorFlow Lite delegate currently supports the following operators: + +- ABS + +- ADD + +- ARGMAX + +- ARGMIN + +- AVERAGE_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- CONCATENATION, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- DEPTH_TO_SPACE + +- DEPTHWISE_CONV_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- DEQUANTIZE + +- DIV + +- EQUAL + +- ELU + +- EXP + +- FULLY_CONNECTED, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- GATHER + +- GREATER + +- GREATER_OR_EQUAL + +- HARD_SWISH + +- LESS + +- LESS_OR_EQUAL + +- LOCAL_RESPONSE_NORMALIZATION + +- LOGICAL_AND +- +- LOGICAL_NOT +- +- LOGICAL_OR + +- LOGISTIC + +- LOG_SOFTMAX + +- L2_NORMALIZATION + +- L2_POOL_2D + +- MAXIMUM + +- MAX_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE + +- MEAN + +- MINIMUM + +- MUL + +- NEG + +- NOT_EQUAL + +- PAD + +- QUANTIZE + +- RESHAPE + +- RESIZE_BILINEAR + +- RESIZE_NEAREST_NEIGHBOR + +- RELU + +- RELU6 + +- RSQRT + +- SOFTMAX + +- SPACE_TO_DEPTH + +- SPLIT + +- SPLIT_V + +- SQRT + +- SUB + +- TANH + +- TRANSPOSE + +- TRANSPOSE_CONV + +More machine learning operators will be supported in future releases. +**/ +} \ No newline at end of file diff --git a/docs/01_parsers.dox b/docs/01_parsers.dox deleted file mode 100644 index 80d616f5e7..0000000000 --- a/docs/01_parsers.dox +++ /dev/null @@ -1,339 +0,0 @@ -/// Copyright (c) 2020 ARM Limited. -/// -/// SPDX-License-Identifier: MIT -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -namespace armnn -{ -/** -@page parsers Parsers - -@tableofcontents -Execute models from different machine learning platforms efficiently with our parsers. Simply choose a parser according -to the model you want to run e.g. If you've got a model in tensorflow format (.pb) use our tensorflow-parser. - -@section S4_caffe_parser ArmNN Caffe Parser - -`armnnCaffeParser` is a library for loading neural networks defined in Caffe protobuf files into the Arm NN runtime. - -## Caffe layers supported by the Arm NN SDK -This reference guide provides a list of Caffe layers the Arm NN SDK currently supports. - -## Although some other neural networks might work, Arm tests the Arm NN SDK with Caffe implementations of the following neural networks: - -- AlexNet. -- Cifar10. -- Inception-BN. -- Resnet_50, Resnet_101 and Resnet_152. -- VGG_CNN_S, VGG_16 and VGG_19. -- Yolov1_tiny. -- Lenet. -- MobileNetv1. -- SqueezeNet v1.0 and SqueezeNet v1.1 - -## The Arm NN SDK supports the following machine learning layers for Caffe networks: - -- BatchNorm, in inference mode. -- Convolution, excluding the Dilation Size, Weight Filler, Bias Filler, Engine, Force nd_im2col, and Axis parameters. - Caffe doesn't support depthwise convolution, the equivalent layer is implemented through the notion of groups. ArmNN supports groups this way: - - when group=1, it is a normal conv2d - - when group=#input_channels, we can replace it by a depthwise convolution - - when group>1 && group<#input_channels, we need to split the input into the given number of groups, apply a separate convolution and then merge the results -- Concat, along the channel dimension only. -- Dropout, in inference mode. -- Element wise, excluding the coefficient parameter. -- Inner Product, excluding the Weight Filler, Bias Filler, Engine, and Axis parameters. -- Input. -- Local Response Normalisation (LRN), excluding the Engine parameter. -- Pooling, excluding the Stochastic Pooling and Engine parameters. -- ReLU. -- Scale. -- Softmax, excluding the Axis and Engine parameters. -- Split. - -More machine learning layers will be supported in future releases. - -Please note that certain deprecated Caffe features are not supported by the armnnCaffeParser. If you think that Arm NN should be able to load your model according to the list of supported layers, but you are getting strange error messages, then try upgrading your model to the latest format using Caffe, either by saving it to a new file or using the upgrade utilities in `caffe/tools`. -



- -@section S5_onnx_parser ArmNN Onnx Parser - -`armnnOnnxParser` is a library for loading neural networks defined in ONNX protobuf files into the Arm NN runtime. - -## ONNX operators that the Arm NN SDK supports - -This reference guide provides a list of ONNX operators the Arm NN SDK currently supports. - -The Arm NN SDK ONNX parser currently only supports fp32 operators. - -## Fully supported - -- Add - - See the ONNX [Add documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Add) for more information - -- AveragePool - - See the ONNX [AveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#AveragePool) for more information. - -- Constant - - See the ONNX [Constant documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Constant) for more information. - -- Clip - - See the ONNX [Clip documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Clip) for more information. - -- Flatten - - See the ONNX [Flatten documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Flatten) for more information. - -- GlobalAveragePool - - See the ONNX [GlobalAveragePool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#GlobalAveragePool) for more information. - -- LeakyRelu - - See the ONNX [LeakyRelu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#LeakyRelu) for more information. - -- MaxPool - - See the ONNX [max_pool documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#MaxPool) for more information. - -- Relu - - See the ONNX [Relu documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Relu) for more information. - -- Reshape - - See the ONNX [Reshape documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Reshape) for more information. - -- Sigmoid - - See the ONNX [Sigmoid documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Sigmoid) for more information. - -- Tanh - - See the ONNX [Tanh documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Tanh) for more information. - - -## Partially supported - -- Conv - - The parser only supports 2D convolutions with a dilation rate of [1, 1] and group = 1 or group = #Nb_of_channel (depthwise convolution) - See the ONNX [Conv documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#Conv) for more information. -- BatchNormalization - - The parser does not support training mode. See the ONNX [BatchNormalization documentation](https://github.com/onnx/onnx/blob/master/docs/Operators.md#BatchNormalization) for more information. -- MatMul - - The parser only supports constant weights in a fully connected layer. - -## Tested networks - -Arm tested these operators with the following ONNX fp32 neural networks: -- Simple MNIST. See the ONNX [MNIST documentation](https://github.com/onnx/models/tree/master/mnist) for more information. -- Mobilenet_v2. See the ONNX [MobileNet documentation](https://github.com/onnx/models/tree/master/models/image_classification/mobilenet) for more information. - -More machine learning operators will be supported in future releases. -



- -@section S6_tf_lite_parser ArmNN Tf Lite Parser - -`armnnTfLiteParser` is a library for loading neural networks defined by TensorFlow Lite FlatBuffers files -into the Arm NN runtime. - -## TensorFlow Lite operators that the Arm NN SDK supports - -This reference guide provides a list of TensorFlow Lite operators the Arm NN SDK currently supports. - -## Fully supported - -The Arm NN SDK TensorFlow Lite parser currently supports the following operators: - -- ADD -- AVERAGE_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE -- BATCH_TO_SPACE -- 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 -- LOGISTIC -- L2_NORMALIZATION -- LEAKY_RELU -- MAX_POOL_2D, Supported Fused Activation: RELU , RELU6 , TANH, NONE -- MAXIMUM -- MEAN -- MINIMUM -- MUL -- NEG -- PACK -- PAD -- QUANTIZE -- RELU -- RELU6 -- RESHAPE -- RESIZE_BILINEAR -- RESIZE_NEAREST_NEIGHBOR -- SLICE -- SOFTMAX -- SPACE_TO_BATCH -- SPLIT -- SPLIT_V -- SQUEEZE -- STRIDED_SLICE -- SUB -- TANH -- TRANSPOSE -- TRANSPOSE_CONV -- UNPACK - -## Custom Operator - -- TFLite_Detection_PostProcess - -## Tested networks - -Arm tested these operators with the following TensorFlow Lite neural network: -- [Quantized MobileNet](http://download.tensorflow.org/models/mobilenet_v1_2018_02_22/mobilenet_v1_1.0_224_quant.tgz) -- [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. -



- -@section S7_tf_parser ArmNN Tensorflow Parser - -`armnnTfParser` is a library for loading neural networks defined by TensorFlow protobuf files into the Arm NN runtime. - -## TensorFlow operators that the Arm NN SDK supports - -This reference guide provides a list of TensorFlow operators the Arm NN SDK currently supports. - -The Arm NN SDK TensorFlow parser currently only supports fp32 operators. - -## Fully supported - -- avg_pool - - See the TensorFlow [avg_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/avg_pool) for more information. -- bias_add - - See the TensorFlow [bias_add documentation](https://www.tensorflow.org/api_docs/python/tf/nn/bias_add) for more information. -- conv2d - - See the TensorFlow [conv2d documentation](https://www.tensorflow.org/api_docs/python/tf/nn/conv2d) for more information. -- expand_dims - - See the TensorFlow [expand_dims documentation](https://www.tensorflow.org/api_docs/python/tf/expand_dims) for more information. -- gather - - See the TensorFlow [gather documentation](https://www.tensorflow.org/api_docs/python/tf/gather) for more information. -- identity - - See the TensorFlow [identity documentation](https://www.tensorflow.org/api_docs/python/tf/identity) for more information. -- local_response_normalization - - See the TensorFlow [local_response_normalization documentation](https://www.tensorflow.org/api_docs/python/tf/nn/local_response_normalization) for more information. -- max_pool - - See the TensorFlow [max_pool documentation](https://www.tensorflow.org/api_docs/python/tf/nn/max_pool) for more information. -- placeholder - - See the TensorFlow [placeholder documentation](https://www.tensorflow.org/api_docs/python/tf/placeholder) for more information. -- reduce_mean - - See the TensorFlow [reduce_mean documentation](https://www.tensorflow.org/api_docs/python/tf/reduce_mean) for more information. -- relu - - See the TensorFlow [relu documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu) for more information. -- relu6 - - See the TensorFlow [relu6 documentation](https://www.tensorflow.org/api_docs/python/tf/nn/relu6) for more information. -- rsqrt - - See the TensorFlow [rsqrt documentation](https://www.tensorflow.org/api_docs/python/tf/math/rsqrt) for more information. -- shape - - See the TensorFlow [shape documentation](https://www.tensorflow.org/api_docs/python/tf/shape) for more information. -- sigmoid - - See the TensorFlow [sigmoid documentation](https://www.tensorflow.org/api_docs/python/tf/sigmoid) for more information. -- softplus - - See the TensorFlow [softplus documentation](https://www.tensorflow.org/api_docs/python/tf/nn/softplus) for more information. -- squeeze - - 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 - -- add - - 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 [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add) for more information. -- add_n - - 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 [add operator documentation](https://www.tensorflow.org/api_docs/python/tf/add_n) for more information. -- concat - - Arm NN supports concatenation along the channel dimension for data formats NHWC and NCHW. -- constant - - The parser does not support the optional `shape` argument. It always infers the shape of the output tensor from `value`. See the TensorFlow [constant documentation](https://www.tensorflow.org/api_docs/python/tf/constant) for further information. -- depthwise_conv2d_native - - The parser only supports a dilation rate of (1,1,1,1). See the TensorFlow [depthwise_conv2d_native documentation](https://www.tensorflow.org/api_docs/python/tf/nn/depthwise_conv2d_native) for more information. -- equal - - 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 [equal operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/equal) for more information. -- fused_batch_norm - - The parser does not support training outputs. See the TensorFlow [fused_batch_norm documentation](https://www.tensorflow.org/api_docs/python/tf/nn/fused_batch_norm) for more information. -- greater - - 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 [greater operator documentation](https://www.tensorflow.org/api_docs/python/tf/math/greater) for more information. -- matmul - - The parser only supports constant weights in a fully connected layer. See the TensorFlow [matmul documentation](https://www.tensorflow.org/api_docs/python/tf/matmul) for more information. -- maximum - where maximum is used in one of the following ways - - max(mul(a, x), x) - - max(mul(x, a), x) - - max(x, mul(a, x)) - - max(x, mul(x, a) - This is interpreted as a ActivationLayer with a LeakyRelu activation function. Any other usage of max will result in the insertion of a simple maximum layer. The parser does not support all forms of [broadcast composition](https://www.tensorflow.org/performance/xla/broadcasting). See the TensorFlow [maximum documentation](https://www.tensorflow.org/api_docs/python/tf/maximum) for more information. -- minimum - - 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 - - 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 [realdiv documentation](https://www.tensorflow.org/api_docs/python/tf/realdiv) for more information. -- reshape - - The parser does not support reshaping to or from 4D. See the TensorFlow [reshape documentation](https://www.tensorflow.org/api_docs/python/tf/reshape) for more information. -- resize_images - - The parser only supports `ResizeMethod.BILINEAR` with `align_corners=False`. See the TensorFlow [resize_images documentation](https://www.tensorflow.org/api_docs/python/tf/image/resize_images) for more information. -- softmax - - 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: -- Lenet -- mobilenet_v1_1.0_224. The Arm NN SDK only supports the non-quantized version of the network. See the [MobileNet_v1 documentation](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md) for more information on quantized networks. -- inception_v3. The Arm NN SDK only supports the official inception_v3 transformed model. See the TensorFlow documentation on [preparing models for mobile deployment](https://www.tensorflow.org/mobile/prepare_models) for more information on how to transform the inception_v3 network. - -Using these datasets: -- Cifar10 -- Simple MNIST. For more information check out the [tutorial](https://developer.arm.com/technologies/machine-learning-on-arm/developer-material/how-to-guides/deploying-a-tensorflow-mnist-model-on-arm-nn) on the Arm Developer portal. - -More machine learning operators will be supported in future releases. - -**/ -} - diff --git a/docs/02_build_guides.dox b/docs/02_build_guides.dox new file mode 100644 index 0000000000..c7e6fcd286 --- /dev/null +++ b/docs/02_build_guides.dox @@ -0,0 +1,26 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page buildguides Build Guides +@tableofcontents + +This page links all guides to build and/or install Arm NN tools. Some of these guides are not hosted in our +repository and will lead you to guides on +https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides + +Arm NN is written using portable C++14 and the build system uses [CMake](https://cmake.org/), therefore it is possible +to build for a wide variety of target platforms, from a wide variety of host environments. + +Arm NN is managed by a single CMake project. That allows you to build multiple tools at once by combining the CMake +options from different build guides. + +## TfLite Delegate build guide +@subpage md_delegate_BuildGuideNative + +**/ +} \ No newline at end of file diff --git a/docs/02_deserializer_serializer.dox b/docs/02_deserializer_serializer.dox deleted file mode 100644 index e61d4a1441..0000000000 --- a/docs/02_deserializer_serializer.dox +++ /dev/null @@ -1,192 +0,0 @@ -/// Copyright (c) 2020 ARM Limited. -/// -/// SPDX-License-Identifier: MIT -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in all -/// copies or substantial portions of the Software. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -/// SOFTWARE. -/// - -namespace armnn -{ -/** -@page serializer Serializer -@tableofcontents - -The `armnnSerializer` is a library for serializing an Arm NN network to a stream. - -@section serializersupport Supported Layers - -This reference guide provides a list of layers which can be serialized by the Arm NN SDK. - -@subsection serializersupportflully Fully supported - -The Arm NN SDK Serializer currently supports the following layers: - -- Activation -- Addition -- ArgMinMax -- BatchToSpaceNd -- BatchNormalization -- Comparison -- Concat -- Constant -- Convolution2d -- DepthToSpace -- DepthwiseConvolution2d -- Dequantize -- DetectionPostProcess -- Division -- ElementwiseUnary -- Fill -- Floor -- FullyConnected -- Gather -- Input -- InstanceNormalization -- L2Normalization -- Logical -- LogSoftmax -- Lstm -- Maximum -- Mean -- Merge -- Minimum -- Multiplication -- Normalization -- Output -- Pad -- Permute -- Pooling2d -- Prelu -- QLstm -- Quantize -- QuantizedLstm -- Rank -- Reshape -- Resize -- Slice -- Softmax -- SpaceToBatchNd -- SpaceToDepth -- Splitter -- Stack -- StandIn -- StridedSlice -- Subtraction -- Switch -- Transpose -- TransposeConvolution2d - -More machine learning layers will be supported in future releases. - -@subsection serializersupportdeprecated Deprecated layers - -Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: - -- Abs will deserialize as ElementwiseUnary -- Equal will deserialize as Comparison -- Greater will deserialize as Comparison -- Merger will deserialize as Concat -- ResizeBilinear will deserialize as Resize -- Rsqrt will deserialize as ElementwiseUnary -



- -@page deserializer Deserializer -@tableofcontents - -The `armnnDeserializer` is a library for loading neural networks defined by Arm NN FlatBuffers files -into the Arm NN runtime. - -@section deserializersupport Supported Layers - -This reference guide provides a list of layers which can be deserialized by the Arm NN SDK. - -@subsection deserializersupportfully Fully supported - -The Arm NN SDK Deserialize parser currently supports the following layers: - -- Abs -- Activation -- Addition -- ArgMinMax -- BatchToSpaceNd -- BatchNormalization -- Concat -- Comparison -- Constant -- Convolution2d -- DepthToSpace -- DepthwiseConvolution2d -- Dequantize -- DetectionPostProcess -- Division -- ElementwiseUnary -- Fill -- Floor -- FullyConnected -- Gather -- Input -- InstanceNormalization -- L2Normalization -- Logical -- LogSoftmax -- Lstm -- Maximum -- Mean -- Merge -- Minimum -- Multiplication -- Normalization -- Output -- Pad -- Permute -- Pooling2d -- Prelu -- Quantize -- QLstm -- QuantizedLstm -- Rank -- Reshape -- Resize -- ResizeBilinear -- Rsqrt -- Slice -- Softmax -- SpaceToBatchNd -- SpaceToDepth -- Splitter -- Stack -- StandIn -- StridedSlice -- Subtraction -- Switch -- TransposeConvolution2d - -More machine learning layers will be supported in future releases. - -@subsection deserializersupportdeprecated Deprecated layers - -Some layers have been deprecated and replaced by others layers. In order to maintain backward compatibility, serializations of these deprecated layers will deserialize to the layers that have replaced them, as follows: - -- Equal will deserialize as Comparison -- Merger will deserialize as Concat -- Greater will deserialize as Comparison -- ResizeBilinear will deserialize as Resize - -**/ -} \ No newline at end of file diff --git a/docs/03_use_guides.dox b/docs/03_use_guides.dox new file mode 100644 index 0000000000..8aeb4f03ea --- /dev/null +++ b/docs/03_use_guides.dox @@ -0,0 +1,21 @@ +/// Copyright (c) 2021 ARM Limited and Contributors. All rights reserved. +/// +/// SPDX-License-Identifier: MIT +/// + +namespace armnn +{ +/** +@page useguides Integration Guides +@tableofcontents + +This page links all guides that explain how to use Arm NN tools and how to integrate them into your own project. +Some of these guides may not be hosted in our repository and will lead you to guides on +https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides + + +## TfLite delegate guides +@subpage md_delegate_IntegrateDelegateIntoPython + +**/ +} \ No newline at end of file diff --git a/docs/Doxyfile b/docs/Doxyfile index 3cf4ac5517..09ad2327ff 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -813,9 +813,12 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ./docs/00_software_tools.dox \ - ./docs/01_parsers.dox \ - ./docs/02_deserializer_serializer.dox \ +INPUT = ./docs/01_00_software_tools.dox \ + ./docs/01_01_parsers.dox \ + ./docs/01_03_delegate.dox \ + ./docs/01_02_deserializer_serializer.dox \ + ./docs/02_build_guides.dox \ + ./docs/03_use_guides.dox \ ./docs/04_backends.dox \ ./src/armnnQuantizer/README.md \ ./src/armnnConverter/README.md \ @@ -828,6 +831,8 @@ INPUT = ./docs/00_software_tools.dox \ ./tests/ \ ./delegate/include \ ./delegate/src/armnn_external_delegate.cpp \ + ./delegate/BuildGuideNative.md \ + ./delegate/IntegrateDelegateIntoPython.md \ ./README.md \ ./docs/FAQ.md -- cgit v1.2.1