aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfLiteParser
AgeCommit message (Collapse)Author
2023-07-17IVGCVSW-7879 Change REVERSE_V2 from LayerWithParameters with 1 input, to ↵Tracy Narine
Layer with 2 inputs * Changing ReverseV2 to use two inputs * This is required by the backends * The ReverseV2Descriptor was removed * Tests updated * Added a Run<> templatefor inputs with different data types Signed-off-by: Tracy Narine <tracy.narine@arm.com> Change-Id: I22f947de829b4b3da6bda3a74f4ffdef4052cc25
2023-07-12Add Square as Mul in the TfLite ParserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I5760da9be2ed63fdfbdd5d3d7b771c310592798d
2023-07-05IVGCVSW-7833 Add ReverseV2 support to TFLite ParserTianle Cheng
* Added ReverseV2 support to TFLite Parser * Added ReverseV2 TFLite Parser unit tests * Updated Parser Docs Signed-off-by: Tianle Cheng <tianle.cheng@arm.com> Change-Id: Idb9a9213f75cd6cf01509a5d06ea5772cf56ac5b
2023-06-30IVGCVSW-7666 Add a FileComparisonExecutor to ExecuteNetwork.Colm Donelan
* Implement the "-C" command line option of executenetwork. * Add a FileComparisonExecutorFile which will read tensors from a previously written text file and compare them to the execution output. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I8380fd263028af13d65a67fb6afd89626d1b07b8
2023-06-29Bugfix: -Werror=unused-result - unnecessary line, previously called aboveFrancis Murtagh
* this line is used earlier to initialize subgraphPtr Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Iff24da2acab33e59460455977e221066973532a2
2023-06-22IVGCVSW-7785 BugFix: ExpandDims not working when batch!=1Teresa Charlin
* This commit fixes partially the ticket. In ToTensorInfo() we assume batch is 1 when it is unknown. We call OutputTensorInfoFromInputs() to amend this assumption/ However, this does not work for reshape layer. Therefore, we have to calculate the output shape in the ParseExpandDims(). Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Iedc32a44b4ec0d8b7d2cc0b08f38f0776402f7bd
2023-05-23BugFix: check for options!=null before adding fused activation in TfLite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I96fd26559450690fbe99a0e8fbe193ddf5d3a34b
2023-05-17IVGCVSW-7400 POW IVGCVSW-7278 SQUARED_DIFFERENCE.John Mcloughlin
* Added 2 new operators as ElementWiseBinary ops * Ref End to End and unit tests * Serialize and Deserialize tests * Delegate and Opaque Delegate tests * TfLite Parser tests Signed-off-by: John Mcloughlin <john.mcloughlin@arm.com> Change-Id: I537158127f602f0c41ca0402aa31655cd3bd4281
2023-05-08Improve reusability of code that is defined out by cmake build pathsRyan OShea
* Added new ARMNN_STUB_PROFILING and ARMNN_DISABLE_DYNAMIC_BACKEND defines to replace BUILD_BARE_METAL and BUILD_EXECUTE_NETWORK_STATIC * Add new CMake variables to disable sample apps and dynamic backends * Improve BUILD_SHARED_LIBS CMake variable * Add new archive output location to various libraries so that the static libraries appear in the same location as the shared libraries * Fixes for bare metal build * Add ARMNN_DISABLE_FILE_SYSTEM defines to missing locations Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: I1db9a8f483e7134bd261294b35240cf21b150d45
2023-04-26BugFix: calculate explicit padding for Transpose Convolution using output sizeTeresa Charlin
* If the output shape is given in Transpose convolution, use it to calculate the padding Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I0bf3dee94c2ce606ed67fb385018b220188c3017
2023-04-19GitHub #640 Add support for CEIL operatorTeresa Charlin
* Reference workload * TfLite Delegate * TfLite Parser * Serializer and Deserializer * Changed fallback tests in delegate to use COS instead of CEIL Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I36e0dbff33694182d1dba0c95d463506428e2f04
2023-04-18GitHub #719 Set quantization parameter scale to 1.0, instead of 0.0.Teresa Charlin
* Arm NN does not account for int8 or uint8 not quantized types, Tensorflow does. Not quantized int8 and uint8 is the same as quantized int8 and uint8 with scale = 1.0 and offset= 0 Default offset/zero_point was already 0, this review sets the default scale to 1.0. Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ibc3eecc281de516c2cc706e17bde01c64ff9556e
2023-03-29BugFix: Mean layer reading negative axis incorrectly in TFLite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I3ccfc2a4c95c57743927fb276faa756740f5c55a
2023-03-14IVGCVSW-3808 Add ElementwiseBinaryLayerMike Kelly
!android-nn-driver:9329 * Added ElementwiseBinaryLayer that can represent all ElementwiseBinary operations including Add, Div, Sub, Maximum, Mul and Minimum. * Updated Delegate to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated Deserializer to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated OnnxParser to use ElementwiseBinaryLayer instead of the Add layer. * Updated TfLiteParser to use ElementwiseBinaryLayer instead of the Add, Div, Sub, Maximum, Mul and Minimum layers. * Updated CL and Neon tests to use ElementwiseBinaryLayer. * Updated CL and Neon Backend Specific Optimizations to accept ElementBinaryLayers as well as Add, Div, Mul, Sub, Maximum and Minimum layers. Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I7cbb96b60eb01f0e2b57b0541016d48a08b86c75
2023-02-24IVGCVSW-7546 SPACE_TO_DEPTH support added in tflite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I4f5016841c31b183440f31c1e177bc41d2b8dbb7
2023-02-22Fix segfault in ParseTransposeConv2d when output_shape is not constantRyan OShea
We currently check that output_shape is an input for transpose conv2d. If that is an input, we assume that it is constant and attempt to copy the data into the descriptor. When this data is not constant and instead comes from the output of another layer we segfault. When not constant we will use infer output shapes. * Adds a check into ParseTransposeConv2d that inputs[0] is constant Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: I01176ae22974767a2306a3db749a029ed220d88b
2023-02-20IVGCVSW-7427 Execute network unable to correctly determineMike Kelly
the shape of the network * Fixed bug where calculated output shape wasn't being recorded in ParseSqueeze. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I8f03a0400323c865e7e8f924d257d6770f809502
2023-01-24IVGCVSW-7277 Fixed issues with FullyConnected on certain TFLite modelsMike Kelly
* TFLite Parser: * Fixed issue in ParseReshape where the targetShape wasn't always calculated correctly * Fixed issue in ParseFullyConnected where the wrong name was used for the ReshapeLayer * Added an ExpandDims to the FullyConnected to ensure that we reshape the output correctly * TFLite Delegate: * Added an ExpandDims to the FullyConnected to ensure that we reshape the output correctly Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I129dfcb8543f8a3a297c0589c841be20ef3b6407
2023-01-12IVGCVSW-7244 ConcatLayer overlapping views on TFLiteParserMike Kelly
* Added ability to calculate dynamic tensors and propagate them through the model so that when those tensors are later used as inputs they have the right shapes. * Added InferOutputShapes to DetectionPostProcessLayer. * Added InferOutputShapes to MeanLayer. * Added InferOutputShapes to RankLayer. * Added InferOutputShapes to ReduceLayer. * Fixed typos in TfLiteParser. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I880c0716938ef278f5dbf01a8a73a5cc99ce5ded
2023-01-10Catch exception by reference instead of by value.Cathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Id765f6d766e623a157b614ca935113a9f32a5801
2023-01-06IVGCVSW-7031 Generate static execute networkRyan OShea
* Build ExecNet lib dependencies as object libs except libarmnn * Disable PIPE when building static ExecNet * Remove multiple definition from AsyncExecutionCallback * Disable DynamicBackend for ExecNet Static build * Disable inference tests for TfLiteParser and ONNX during static ExecNet * Remove Tensorflow Parser if condition * Add Disable thread macro to InferenceModel * Don't compile dynamic backend symbols in Runtime.cpp for Baremetal and Exenet Static Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: If41c063eab5f05b3df0a6e064924a36a177f116a
2023-01-05GitHub #543 Problem Parsing Mixed-Precision ModelMike Kelly
* Fixed bug when converting Constants with Per-Axis Quantization Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ifbea23e60483746ec987da491dae96e74cb33af4
2022-11-22IVGCVSW-6980 Delegate support for slice operatorCathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I90d800160b070e25d999b5102a7ce6d3e0ed6a81
2022-09-26IVGCVSW-7158 TfLiteParser supports reshape when output 'shape_signature' ↵Cathal Corbett
param contains a value of -1. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I538347083e9f22b3f3b6c048aebc2cf5cf4dc786
2022-09-22IVGCVSW-7240 Adjoint is Transpose in TFLite. Change in TFLite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I1bc3d50b8fa6e216d8b6b7e3421d2ff37a21712c
2022-09-20IVGCVSW-7040 TfLiteParser fails to prepare model due to unspecified size ↵Cathal Corbett
buffer data for Slice operator. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I86735faf8d57168a63ca6657f281ec03b90f7235
2022-09-05IVGCVSW-6497: BatchMatMul TfLite ParserSamuel Yap
* Added armnnTfLiteParser for BatchMatMul * Added unit testing for parser * Updated CMakeLists Signed-off-by: Samuel Yap <samuel.yap@arm.com> Change-Id: If6842aaf7cf08f688093b714e2ecea6e8cd87161
2022-08-05IVGCVSW-7103 ExecuteNetwork failed while doing Yolov4 executionNikhil Raj
* Adding the check only if it's not a const layer which is needed to run ai_benchmark_v5_yolo_v4_tiny_quant.tflite model * We still won't be able to run the model due to IVGCVSW-7158 Signed-off-by: Nikhil Raj <nikraj01@e126673.cambridge.arm.com> Change-Id: Ib7e77a0b5a64be0c92a8e4eae45729f799770b37
2022-08-05Fix '#if defined(ARMNN_POST_TFLITE_2_3)' in TfLiteParser Conv3D test.Cathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I5c68b81a67fc2b5a33cf62753351440564bb868e
2022-07-27IVGCVSW-7094 Add LOG and SIN support to tflite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I979a6f43c0d6ec49effb9a87339dbcd07678d2bd
2022-07-08IVGCVSW-7024 Add missing license info for reuse lintJim Flynn
Signed-off-by: Jim Flynn <jim.flynn@arm.com> Change-Id: I97dee6982e0a7be01c13e9e803c0997547a39ff1
2022-07-08IVGCVSW-7040 Add support for LOG_SOFTMAX to the TFLiteParserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I1fedfdf2cd8871d6b307fce8620f40adadf75f04
2022-06-15GitHub 653: Segfault when parsing Unidirectional Sequence LSTMMike Kelly
* Fixed Segfault when parsing Unidirectional Sequence LSTM Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ic69a4190c60ef595be64bc2c356e540319381b7e
2022-05-18IVGCVSW-6929 Support for models with implicit expandedMike Kelly
dimensions * Added allow-expanded-dims to TFLite parser and ArmNN delegate * If true ArmNN will disregard dimensions with a size of 1 when validating tensor shapes. Tensor sizes must still match. * This allows us to support models where tensors have expanded dimensions (i.e. extra dimensions with a size of 1). * Fixed bug in Network where it assumed that only the first option could be ShapeInferenceMethod. * Fixed bug where m_ShapeInferenceMethod was lost when copying or moving Graphs. * Changed Delegate to pass "infer-output-shape", "allow-expanded-dims" and other BackendOptions through to the Network during construction. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ibe7c5ae6597796fc9164cb07bd372bd7f8f8cacf
2022-05-16IVGCVSW-6124 ConstTensorsAsInput: Conv2d - FrontEndKeith Davis
* Update Front-end and Tools. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Ref. * Fixed resulting Neon / CL tests * Unified optimizers for conv2d ops * Optimizer Fix - Fp32ToBf16 * Partial implementation for ACL backends to fix VTS failures !android-nn-driver:7477 Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I5fb18877f7ee32643e15a9818945356274bb401b
2022-05-05IVGCVSW-6127 ConstTensorsAsInput: DepthwiseConvolution2dCathal Corbett
!android-nn-driver:7418 * Update Front-end and Tools. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Change NNDriver to new API. * Updated Ref. * Neon and Cl backend partially completed (Backend.cpp files). * Added dynamic or constant input EndToEnd tests. * Added ConstantTensorAsInputMemeberVariableRedirect Optimization. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ib18b6c10a093042e165e25237dc04a4c67ba82da
2022-05-05IVGCVSW-6938 Do not add Floor when FloorDiv is int32 in TfliteparserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I7ce633a66e2ecb72a9cdd1bff690c4195a9a449f
2022-05-04IVGCVSW-6936 Add SQRT support to tflite parserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I3b1f44c10a3446cfe45a7757d8a98e9788ec5dc0
2022-05-04IVGCVSW-6857 Add GATHERNd Support to the TfLiteParserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I8142072f104b23c6eaf80b54cf6ddfa0393c4921
2022-04-22MLCE-604 Add Unidirectional Sequence Lstm support to TFLiteMike Kelly
* Added Unidirectional Sequence Lstm support to TFLite Parser * Added support for float operations with int8 weights to TFLite Parser * Added to Conv2d, Conv3D, DepthwiseConv2D, FullyConnected, TransposeConv and UnidirectionalSequenceLstm * Renamed subgraphIndex to subgraph to fix name-shadowing warning. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I818976ab88abc05dcb4bad246fb4108e6e879283
2022-03-29Bug fix in ParseConv3D dilationZTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I9f0acb71c4859116f57266637a35584278937ef9
2022-03-09IVGCVSW-6454 Add FLOOR_DIV Support to the TfLiteParserTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I7ab32f2998c2bc25fee8831d4be724286263b4b3
2022-02-07IVGCVSW-6635 Move MemCopyTestImpl from acl to armnnTestUtils.Colm Donelan
* Move MemCopyTestImpl.hpp from src/backends/aclCommon/test/ to include/armnnTestutils. * Refactor MemCopyTests in aclCommon, cl and Neon. * Introduce RefMemCopyTests to exercise this utility in x86 builds. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I8824f013d3656658ed0a2904bb79384e3af68641
2022-02-04IVGCVSW-6727 Updating error messages from the flatbuffers parser.Colm Donelan
Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I45fb3f06533b031dd4e65b91561b699555e072b4
2022-01-26GitHub #603 Add PADV2 support to TFLite ParserMike Kelly
* Added PADV2 support to TFLite Parser * Added PADV2 unit tests * Updated Parser Docs Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I06ea9a6ceddc38cdb89204c019432257d3f58e4c
2022-01-26IVGCVSW-6727 Change asserts to CHECK in ParserFlatbuffersFixture.hpp.Colm Donelan
* ReadStringToBinary was using ARMNN_ASSERT_MSG which is hiding unit test errors in release builds. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Ib5d6846525a3a1191f85004c7985773917a1f609
2021-12-22IVGCVSW-6252 Armnn Error: Failed to parse operator #1 withinCathal Corbett
subgraph #0 error: Operator not supported * Added missing support for reshape operator in tflite parser when the target shape is dynamic and batch size is unknown * Added corresponding unit test Change-Id: I35e159c9c70440168c6092d2ad02828bb2b81cd9 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
2021-12-14IVGCVSW-6453 'Move the ArmNN Test Utils code to a physically separate directory'Sadik Armagan
* Created include/armnnTestUtils directory * Moved Arm NN test utils files into armnnTestUtils directory Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I03ac54c645c41c52650c4c03b6a58fb1481fef5d
2021-12-01Revert "IVGCVSW-6252 Armnn Error: Failed to parse operator #1 within ↵Teresa Charlin
subgraph #0 error: Operator not supported" This reverts commit 9fc259682c8b85af58bda42e87703bbec5ae57ce. Fixes: IVGCVSW-6644 ExecuteNetwork tests failing with invalid input shape in Reshape layer Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I561e0bd9ed1b92491cb8a08635042e199dd661d8
2021-11-26IVGCVSW-6252 Armnn Error: Failed to parse operator #1 within subgraph #0 ↵Tamas Nyiri
error: Operator not supported * Added missing support for reshape operator in tflite parser when the target shape is dynamic and batch size is unknown * Added corresponding unit test Change-Id: I78f4b386f2e5e0d08ecacde17e33e304f6afbb70 Signed-off-by: Tamas Nyiri <tamas.nyiri@arm.com>