aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/DelegateUtils.hpp
AgeCommit message (Collapse)Author
2022-01-18IVGCVSW-6717 'Inference Passes on Tflite-Parser but fails when using Arm NN ↵Sadik Armagan
Delegate' Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I40ab6aff4bc076eafcef08c1c20aacdbd52da853
2021-11-08IVGCVSW-6420: Constant flag in tensor info is not set correctlyCathal Corbett
!android-nn-driver:6532 !armnn-internal-tests:372451 * Made fix to 2 out of 3 ConstTensor() constructors in Tensor.hpp to throw InvalidArgumentException when TensorInfo isConstant parameter is false. * Added new ConstTensor() constructor in Tensor.cpp to accept vector<>.data() using template<typename MemoryType>. * Fixed runtime->GetOutputTensorInfo()/GetInputTensorInfo() methods and called submethods to return TensorInfo& rather than TensorInfo. * Fixed all failing unit tests for CpuRef/CpuAcc/GpuAcc to ensure any ConstTensor created has it's TensorInfo isConstant set to true. * Added unit tests in TensorTest.cpp to ensure ConstTensor constructors throw InvalidArgumentException when TensorInfo isConstat parameter is false. * Added unit test to ensure an empty ConstTensor constructor will set TensorInfo isConatant to true. * Indentation fixes. * Fix to arm_tensor.i to add isConstant parameter to TensorInfo constructor. Added methods IsConstant() and SetConstant(). * Fix to const_tensor.py to throw ValueError when TensorInfo isConstant is set to false when constructing a ConstTensor. * Fixed PyArmnn unit tests to set TensorInfo isConstant to True when ConstTensor is used. * Added unit tests in test_const_tensor.py to ensure ConstTensor constructors throw ValueError when TensorInfo isConstat parameter is false. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I44e440dd0422c366d31bbdbc77ad2b4db0bde148
2021-11-01IVGCVSW-6457 Add FLOOR_DIV Support to the TfLiteDelegateJim Flynn
Change-Id: Ia4bf42b1f3f86b947825dff8e538d2d4343effab Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2021-10-22IVGCVSW-6166 Add Support for Conv3d to TFLite DelegateMatthew Sloyan
* Conv3d is only correctly supported for external delegates from TF v2.6, as there was a breaking bug in v2.5. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ib7941307f4c7b0d3dbb7deaa5a90aceb63c1162f
2021-09-29IVGCVSW-6160 Support building tensorflowlite 2.5 through cmakeKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I825f09d008505e701d42b79be936f4da24620c06
2021-08-31MLCE-530 Add support for UnidirectionalSequenceLstm to armnn delegateNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ib04f8d6b9e60a4204c56eba4c2ecd2b316509dcc
2021-08-06IVGCVSW-6119 ConstTensorsAsInput: FullyConnectedMatthew Sloyan
* Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Schema with IsConstant and ConstantTensorsAsInputs. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added dynamic or constant input EndToEnd tests. !android-nn-driver:5959 Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696
2021-06-16IVGCVSW-5826 Change weights layout for depthwise to [1,H,W,I*M]Jan Eilers
* This change is necessary because tflite uses a [1,H,W,I*M] format and uses the I*M dimension for per axis quantization. Our previous layout [M,I,H,W] can't handle the correlating quantization scales. * Updates Onnx-, TfLiteParser and TfliteDelegate * Updates the CpuRef, CpuAcc and GpuAcc backends * Adjusts unit tests * Adds test to ensure models with old layout can still be read and executed * Adds conversion function to previous layout [1,H,W,I*M] --> [M,I,H,W] which can be used by backend developers !android-nn-driver:5553 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ifef23368b8c3702cf315a5838d214f7dc13c0152
2021-05-07IVGCVSW-5418 'ExecuteNetwork test for MobileBERT'Sadik Armagan
* Set the correct index for connecting constant layers. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I86a626b82943e0d04b8ecb6b4f0f1b750b22d161
2021-05-06IVGCVSW-5418 'ExecuteNetwork test for MobileBERT'Sadik Armagan
* Refactored the code for checking constant inputs. * Added a unit test for ADD operator with constant input. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ie7207e5a1ce77ea305552859de32a66e07c68a6f
2021-04-21IVGCVSW-5842 Remove cross-wiring in depthwiseJan Eilers
* Reading tensor infos won't allow a permutation vector anymore. The permutation only changed the quantization dimension not the shape and was therefore misleading * The permutation of the full tensor info is now performed in armnnUtils::Permuted * Changed TfLite Parser depthwise parsing function * Added unit tests to TfLite Parser with more random data * Changed TfLite Delegate depthwise parsing function * Added unit test to the delegate with per channel quantization !android-nn-driver:5412 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I1f985ee69547bcaf16a72201e00a6b6fe1ef9a97
2021-04-19IVGCVSW-5829 Segfault in TfLiteDelegateMatthew Sloyan
* Updated Split function to read correct axis data. * Improved validation in Split and SplitV function. * Moved ComputeWrappedIndex function to DelegateUtils.hpp. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I8c7d0c9b747d1ab548df98da930d838c2f57659e
2021-04-09MLCE-328 Serializer/Deserializer does not support Signed64Mike Kelly
* Added support for Signed64 to flatbuffer's schema & updated source tree * Added support for Signed64 to TFLite Delegate * Added support for Signed64 to Serializer * Added support for Signed64 to Deserializer * Added unit test for ArgMinMax to Deserializer * Deprecated m_Output_Type from the ArgMinMaxDescriptor: the output type is solely determined by the DataType of the output Tensor * Fixed issue where RefArgMinMaxWorkload could output data using the wrong DataType * Added Signed64 to RefLayerSupport::IsArgMinMaxSupported as a supported type Signed-off-by: Mike Kelly <mike.kelly@arm.com> Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ib622c052a1f8aa3e658262f8bde5a6881a8cbe10
2021-03-03IVGCVSW-5612 Fix tiny_wav2letter_relu_fixed_int8 delegate outputexperimental/abi-testsFinn Williams
* fix delegate perchannel quantization * change delegate to check reshape options before inputs * Add int8 "qsymms8" option to ExecuteNetwork * Add option to run ExecuteNetwork on tflite w/o delegate !referencetests:301301 Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: If3e12599b17aff1199d7ab0a55e1c901e480083d
2021-01-28IVGCVSW-4874 Provide LayerSupportHandle to frontend usersFrancis Murtagh
* Add test for new IsBackendRegistered member function of Handle * Move deprecated messages to new frontend API of LayerSupportHandle * Update delegate to use dot operator for IsXXXLayerSupported Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I70d7166e207a10e4b3583a827ca0dda2169bcba1 !android-nn-driver:4940
2021-01-25IVGCVSW-5619 Add OptimizerOptions and NetworkProperties to ArmNN DelegateNarumol Prangnawarat
* Add OptimizerOptions, NetworkProperties, DebugCallbackFunction to DelegateOptions * Enable OptimizerOptions when the network is being optimized * Enable NetworkProperties when loading network * Enable DebugCallbackFunction * Add error message when loading network * Log warning instead of error when operator is not supported but could fallback to another backend * Improve uint16_t CompareData * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I353035afb442774bfeb1c62570a90755c2ceaf38
2020-11-30IVGCVSW-5374 Provide Android Build for DelegateKeith Davis
* Fix Arm Android Compiler errors Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: If5fae0fda08b6102eb46217564a096f87a3b6740
2020-11-30IVGCVSW-5393 'TfLiteDelegate: Implement the split operators'Sadik Armagan
* Added SPLIT and SPLIT_V support to armnn_delegate Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I2def9b8be783b25ef17a997e521c6027553035d3
2020-11-18IVGCVSW-5377 'Add ArmNN TfLite delegate to ExecuteNetwork'Sadik Armagan
* Assign correct input values for the model * Call the right Validate function for Mul and Sub operators * Return the correct data type for kTfLiteInt8 Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I6d23adf68d33d8be9a1fbf5d19dfe47939a6d3d6
2020-11-17IVGCVSW-5539 'Elementwise layers with const tensors are not connecting up'Sadik Armagan
* Added Constant Input support to ElementwiseBinary Layers Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I1d429fd7958fe2aa53f06c229a863243569c0d71
2020-11-16IVGCVSW-5508 Activate compiler warnings in ArmNN TfLite DelegateFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I1a8e2aa618ff693c61010e6150f3ca41b8ab1201
2020-11-16IVGCVSW-5338 TfLiteDelegate: Implement the Convolution operatorsSadik Armagan
* Add Convolution, DepthwiseConvolution and TransposeConvolution Signed-off-by: Kevin May <kevin.may@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I797e42844dfee0cc80beb64eabc3111b96320daf
2020-11-12IVGCVSW-5504 'TfLiteDelegate: Introduce FP16 and BackendOptions'Sadik Armagan
* Added BackendOptions creations of armnn_delegate * Included armnn/third-party the armnn_delegate unit tests * Updated the CreateConstTensor function Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I8e2099a465766b905bff701413307e5850b68e42
2020-11-10IVGCVSW-5389 'TfLiteDelegate: Implement the FullyConnected operator'Sadik Armagan
* Added FullyConnected operator support to delegate Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Iae9c0980a4bfd6aa4d90f107f329dfa782baeefe
2020-11-10IVGCVSW-5387 TfLiteDelegate: Implement the Pooling operatorsNarumol Prangnawarat
* Implement MaxPool2d operators * Add QAsymmS8 to armnn delegate * Unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I1815ade6ccda3e9331bd3a68e164be0f6947e9df
2020-11-10IVGCVSW-5398 TfLiteDelegate: Implement the Quantization operatorsMatthew Sloyan
* Enabled quantization operators DEQUANTIZE and QUANTIZE. * Implemented unit tests for quantization operators. * Added utils function for checking if affine quantization. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I84b5c75bda629d9234f5ed198b04f527705a54aa
2020-11-10IVGCVSW-5380 'TfLiteDelegate: Implement the Comparison operators'Sadik Armagan
* Implemented Comparison Operators * Added unit tests Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Icdc0f7c6a286a8364a2770b26d15e8958291dc2b
2020-10-29IVGCVSW-5379 'TfLiteDelegate: Implement the ElementWiseBinary operators'Sadik Armagan
* Implemented ADD operator * Implemented FP32 unit tests for ADD operator Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Id7238749308855bd2b2118f4b6e60e765815c38f
2020-10-27IVGCVSW-5366 'Add a do nothing SubGraph class'Sadik Armagan
IVGCVSW-5373 'Implement the ABS operator in the Delegate' * Added a Switch statement into the VisitNode() function * Separated the Visit functions into the categorized source files * Implemented VisitElementwiseUnary() function * Added tests for ABS and SQRT Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: If9654d0a8d8ff7dcd6fb5cbe0dc312941772affb