aboutsummaryrefslogtreecommitdiff
path: root/delegate
AgeCommit message (Collapse)Author
2022-06-22Revert "Revert "IVGCVSW-6873 Import inputs but don't export outputs fails.""Francis Murtagh
This reverts commit a0f8b15d4ddb5075f380003ff31b271d389d3b66. Reason for revert: <Test ClDmaBufInternalTests review > Change-Id: Ibc4a77fa008643849da7330391942e4c87b941e2
2022-06-21Revert "IVGCVSW-6873 Import inputs but don't export outputs fails."James Conroy
This reverts commit 03bf98a8bc51ad20eef4b9ca5fbf6ce15e063721. Reason for revert: Caused failures in tests located in internal repo. Change-Id: If35cb0ede349b270e4e7827324382e09455d8cfa
2022-06-20IVGCVSW-6873 Import inputs but don't export outputs fails.Colm Donelan
Only one bool is used to indicate whether inputs should be imported. However, its possible for the user to want to import inputs but not export outputs. In addition it's possible for a user to enabled import during optimize but then pass a memory source that does not require import. * Add m_ExportEnabled to INetwork.hpp. * Modify Network::dNetwork to consider both m_ImportEnabled and m_ExportEnabled. * Add ValidateSourcesMatchOptimizedNetwork to LoadedNetwork to validate import options between optimize and network load. * Update the TfLite delegate consider exportEnabled flag in the optimizer. !armnn-internal-tests:425350 Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I776eab81595898e43f91ab40306962eae61329f4
2022-06-15IVGCVSW-6946 Add Pool3D to tflite delegateRyan OShea
* Add new test and test helper for Pool3d * Add new custom operator to switch in armnn_delegate.cpp * Add new pool3d function to pooling.hpp * Update doxygen Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: I77a541bf423b337c749e70c564cdd727efe2fd05
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-06IVGCVSW-6929 Fix for segfault in tflite delegateMike Kelly
* It's possible that a model may have an input entry for bias tensors but that the index for those is -1. If it's -1 then it's not present. * Fixed logic error in IsOptionalOperandPresent: it returned false if it was present and true if it was missing. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I45ad8d8552122493c529b1a35a5689416ccfbb71
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-6862 Add GATHERNd Neon workloadTeresa Charlin
* Changing the test in the delegate to match one of the unit tests Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I553ca266116ba8ee173fc951ab1ffd2b6eed1428
2022-05-05IVGCVSW-6806 Add Unidirectional Sequence Lstm support to NeonMike Kelly
* Corrected TensorInfo order for IsUnidirectionalSequenceLstmSupported * outputStateOut TensorInfo is not optional. * cellStateOut TensorInfo is not optional. * TensorInfo Order matches other QLSTM/LSTM layers. * Added missing parameters to UnidirectionalSequenceLstmOperator for delegate. * Added quantized UnidirectionalSequenceLstm support to Neon !android-nn-driver:7457 Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I26dde1bb96793dd25eb9081ca5ae5f63752288c4
2022-05-04IVGCVSW-6858 Add GATHERNd Support to the TfLite DelegateTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I56418875b3bb2ae45b5c69bfeaafa1a6126b8085
2022-03-23IVGCVSW-6706 Move headers to profiling/client/includeJim Flynn
!android-nn-driver:7337 Change-Id: Ide401623829cc99fb9b51e9bbce3482ce706a8dd Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-01IVGCVSW-6704 Change the namespace from armnn::profiling to arm::pipeCathal Corbett
* Updated ABI version to 29 due to being the first ABI break in 22.05 !android-nn-driver:7226 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I9c50007dcd5b5e792757e7bd1213606df5ffec36
2022-02-17Update TfLite build guidesNikhil Raj
* Update path changes in building TF, CL * Add option to switch off XNN package while building TFLite * Remove obsolete links Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Ib2c932ceb8ef2be4e01ac77ac8f880f814d452cb
2022-02-14IVGCVSW-6708 Break Profiling Dependence on IRuntime ExternalProfilingOptionsJim Flynn
Change-Id: I30a46f3368bbbf33019eac4fa1245f6ff69deacd Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-02-11MLCE-754 'Improve operator support error/warning from Arm NN Delegate'Sadik Armagan
* Improved error reporting on armnn_delegate Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I1bd131fb56d64b32b1fafad0465256178720226c
2022-02-03IVGCVSW-6724 Accessing ConstTensors from IConnectableLayerNikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I01f42a520d15c6dabd2f77c7715c91b8f7026476
2022-02-02IVGCVSW-6639 Add GetParameters to IConnectableLayerJim Flynn
Change-Id: Id55a460ecb510f5b30235b03f54390f2c8188fc2 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
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
2022-01-18MLCE-736 'Adding support for TfLite Models'Sadik Armagan
* Added constant input supports for Pack/Stack, Concatenation operators * Added Int32 support to Pack/Stack operator on CpuRef * Removed unsupported operator from TfLite Delegate Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I64203e174300d23eedeb22bddefe07e931c4eff3
2022-01-14IVGCVSW-6633 SubgraphView uses IConnectableLayer rather than Layer in its ↵Francis Murtagh
m_Layers * Added IInputSlot, IOutputSlot and IConnectableLayer to SubgraphView * Deprecated old member functions * Removed deprecated calls in ArmNN * Added GetOwningIConnectableLayer function to IOutputSlot * Updates ArmNN Core Major version for IOutputSlot ABI break * Updated Minor version of TfliteParser, OnnxParser and Delegate Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I2a8611bfabf5ae09d3602fe6a4bef166e18117b9
2021-12-21IVGCVSW-6668 Updating build guidesMike Kelly
* Updated build guides to refer to get_compute_library.sh and get_tensorflow.sh * Corrected TensorFlow Version in guides was v2.5.1 but release notes say v2.5.0 * Reordered command sequence to ensure that Arm NN is downloaded and ready before downloading TensorFlow or Arm Compute Library * Fixed hyperlinks in MD files * Added whitespace to fix MD formatting. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Iabc309cbbd41d969eb1e11e9dd33a0b1da39a27b
2021-12-08Add addition timing logging outputJan Eilers
* Adds ExecuteNetwork when building the delegate only * Adds timings to delegate subgraph creation * Adds executions times Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ieff2f67ea8dbb6c2a708f8810e84a20485b7a631
2021-11-12Bump Major Version of Delegate to account for ABI breaking changesFrancis Murtagh
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I53f884d2b534b6b009c0717172d977af8b75a7e3
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-08Fix stand-alone delegate buildJan Eilers
* adds missing dependencies to fix errors when building the armnn delegate on its own Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I9bb676febc80eba277f981f5536a9add48e7f6dd
2021-11-04Add CpuAcc and GpuAcc TfLite Delegate tests for Conv3dMatthew Sloyan
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I3e91796a69f02a8eff3018a1d17a496a66076db5
2021-11-02Move command line parsing in external delegate to DelegateOptionsJan Eilers
* Moves the creation of a DelegateOption object from armnn_external_delegate to DelegateOptions. * This allows this code to be reused elsewhere * Allow boolean values of DelegateOptions to be passed as strings e.g. 'true' or 'false' * Add unit tests Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I0ada17f511027dd3f47a85142cae346464682f5a
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-29Fix armnn_external_delegate option parsingJan Eilers
* Fixed the mechanism in armnn_delegate.cpp which creates the runtime options by moving it to DelegateOptions. BackendOptions are used in the runtime options as well as in the optimizer options but need to be processed separately. * Added runtime options to DelegateOptions to make it easier to differ between backend options of the runtime and the optimization * Updated armnn_external_delegate to use runtime options * Added explanations to OptimizerOptions Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I34235474147def261821e4576dd41a83ad492258
2021-10-27IVGCVSW-6469 Add MirrorPad TfLiteParser and TfLiteDelegate SupportMatthew Sloyan
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ia1c97adb401c5381341408ec1e4da287ef2d48fe
2021-10-27IVGCVSW-5879 Fix problems with using internal profiling from delegate.Colm Donelan
* Pass through the value of m_EnableProfiling from Executenetwork to DelegateOptions. * If internal profiling is enabled print it out from inside the delegate. * Remove an unnecessary ProfilerImpl instance from WorkingMemhandle.hpp * Remove an unnecessary parameter from TfLiteDelegateMainImpl in ExecuteNetwork. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Ia1d4b1eb3a05ca5b4d80cc39e138c7fac182d948
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-10-21IVGCVSW-6237 Assess documentation impact and update relevant placesKeith Davis
* Update Tensorflow and CMake versions * Change Delegate python guide to be Quick Start guide * Add links to Github prebuilt binaries Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I10797fdb6794391d80315b57a128587548df77f6
2021-10-15Profile optimizer in DelegateDerek Lamberti
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Change-Id: Ic21e9e8ca1e3e7373db060e701c015623af29f14
2021-10-11IVGCVSW-5752 Add missing runtime parameters to TfLite delegate.Colm Donelan
* Adding Runtime parameter: dynamic-backends-path * Add profiling parameters: gpu-enable-profiling, enable-internal-profiling, internal-profiling-detail, enable-external-profiling, timeline-profiling, outgoing-capture-file, incoming-capture-file, file-only-external-profiling, counter-capture-period, profiling-file-format * Adding utility parameter "serialize-to-dot" Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ibff4b9a85ff0f0da5d70e8aa0bb6cba96aaabbc3
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-09-24IVGCVSW-3705 Add Channel Shuffle Front end and Ref ImplementationSimon Obute
* Add front end * Add reference workload * Add unit tests * Add Serializer and Deserializer * Update ArmNN Versioning Signed-off-by: Simon Obute <simon.obute@arm.com> Change-Id: I9ac1f953af3974382eac8e8d62d794d2344e8f47
2021-09-23IVGCVSW-6181 patch to allow building against tflite > v2.3Jim Flynn
Change-Id: I292add699b2af32fab87b98929fe6fee79fdf356 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2021-09-22IVGCVSW-6232 Integrate static library libtensorflow-lite.a with ArmNNKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ieb5fa0c4bb6753f0af21cfd80f1bf9faba55f7d0
2021-09-03IVGCVSW-6262 Add support for Reduce ProdTeresa Charlin
* Tflite parser * Tflite delegate * Serializer * Deserializer * Ref, CpuAcc and GpuAcc workloads Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I601a9ee1680b372c7955d9a628857d08c3cfd377
2021-08-31MLCE-530 Add support of int8 weight for UnidirectionalSequenceLstmNarumol Prangnawarat
to Ref backend and armnn delegate Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I203d0029c12221228ffe229acda3c90594394e9b
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-5922 Update minor version for all parsers.Matthew Sloyan
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I3a3e5b017c307e374457b18712585dce210f8922
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-18MLCE-510 Add CpuRef Shape Operator to ArmNNKeith Davis
* Add TfLiteParser and delegate support Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Id3219ba7cc7128b5e73de2c7d8d076a40dcce9c5
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-06-01IVGCVSW-5833 Move the ProfilingGuid out of Types.hpp to its own header in ↵Nikhil Raj
profiling common !android-nn-driver:5691 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Ib71af0831e324ac6bd27b1a36f4a6ec1a703b14a
2021-05-27IVGCVSW-6061 Add PRELU support to TF Lite delegateJames Conroy
* Alpha is supported both as a constant and as an input tensor. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I20f30d479b87dc5fbcf75a1ce5305d70ae9b0646
2021-05-18IVGCVSW-6026 Delegate VisitUnpackOperator not supported errorKevin May
* Determine Splitter outputs to correctly perform validation * Add validation for a Reshape Layer * Add back the Num6 Axis2 test to CpuAcc and GpuAcc Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I1e8108ce50d81420057d7a8b098a07eda63c5c8d