aboutsummaryrefslogtreecommitdiff
path: root/delegate/include
AgeCommit message (Collapse)Author
2023-06-22Bugfix: explicitly state the header to be included to replace deprecated oneFrancis Murtagh
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I3f2bc1afc9873ed111b756717b2e86acce268598
2023-03-28IVGCVSW-7555 Restructure DelegateTeresa Charlin
* New folders created: * common is for common code where TfLite API is not used * classic is for existing delegate implementations * opaque is for new opaque delegate implementation, * tests is for shared between existing Delegate and Opaque Delegate which have test utils to work which delegate to use. * Existing delegate is built to libarmnnDelegate.so and opaque delegate is built as libarmnnOpaqueDelegate.so * Opaque structure is introduced but no API is added yet. * CmakeList.txt and delegate/CMakeList.txt have been modified and 2 new CmakeList.txt added * Rename BUILD_ARMNN_TFLITE_DELEGATE as BUILD_CLASSIC_DELEGATE * Rename BUILD_ARMNN_TFLITE_OPAQUE_DELEGATE as BUILD_OPAQUE_DELEGATE Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ib682b9ad0ac8d8acdc4ec6d9099bb0008a9fe8ed
2023-03-22IVGCVSW-7526 Upgrade ArmNN to Tensorflow 2.12Ryan OShea
When creating a flatbuffers model, we need to provide an empty buffer 0 that is reserved by tensorflow. When creating empty buffers for inputs and outputs we can not pass in an empty vector, or tflite will assume that we know how many bytes to allocate in advance. Instead we need to only pass in the builder. * Update libraries in FindTfLite.cmake * Add nullptr to delegate struct for OpaqueDelegateBuilder * Fix issue in unit tests where Flatbuffers model was not being parsed by tflite * Tensorflow 2.12 now includes C++ 17 features. Update our cmake build to require a compiler to support these features. * Change minimum cmake in Arm NN to 3.7 as that's the minimum for the delegate build. Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I7d15b196b8c59b1914f8fc1c4c2f8960630c069c
2023-02-06IVGCVSW-7476 Remove ProfilingOptions from DelegateOptions.Colm Donelan
ProfilingOptions is not used in DelegateOptions. Instead the parameters are passed in through the RuntimeOptions. This is done in ExecuteNetwork and TfliteExecutor. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Iaab3d4ef277c47e1ff82a51ba2648f5f51ec3e2c
2023-01-24IVGCVSW-7297 When creating multiple Executors only the lastMike Kelly
one works fine * All ArmNNExecutors now share a single IRuntime. * All armnn_delegates now share a single IRuntime. * Increased delegate major version. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I95cbdc32655ec0beb476dbb2d60f1a0209df8f04
2022-11-16IVGCVSW-7214 Disable BF16-Turbo-Mode and remove conversion layersRyan OShea
- Remove Bf16ToFp32 Conversion Layer - Remove Fp32ToBf16 Conversion Layer - Remove B16 Conversion tests * Throw exception if m_ReduceFp32ToBf16 optimzer option is set to true * Provide comments to enable fast math in order to use bf16 * Update docs to inform users to enable fast math for bf16 Execute Network Changes * Require bf16_turbo_mode to also have fast_math_enabled set to true - Remove setting m_ReduceFp32ToBf16 optimizer option Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Ibaa6da9d29c96a1ce32ff5196b0847fde9f04a1c
2022-08-29IVGCVSW-6603 'Add a no fallback mode to the TfLite Delegate'Sadik Armagan
* Added disable-tflite-runtime-fallback option to armnn_delegate * Updated armnn_delegate version Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I449b16404d3ffe98e6dac52a43e7c25225addd73
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-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-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-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-14IVGCVSW-6708 Break Profiling Dependence on IRuntime ExternalProfilingOptionsJim Flynn
Change-Id: I30a46f3368bbbf33019eac4fa1245f6ff69deacd Signed-off-by: Jim Flynn <jim.flynn@arm.com>
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-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-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-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-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-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-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-08-06IVGCVSW-5922 Update minor version for all parsers.Matthew Sloyan
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I3a3e5b017c307e374457b18712585dce210f8922
2021-03-25IVGCVSW-5736 and IVGCVSW-5743 'NonConstWeights: Update front-end and ↵Sadik Armagan
TfLiteDelegate support for FullyConnected Operator' * Added front-end support for non-const weights for FULLY_CONNECTED operator * Added FULLY_CONNECTED end-to-end test * Updated FULLY_CONNECTED operator support in TfLite Arm NN Delegate for non-const weights * Updated the version numbers Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Iffa5b9aa9297aca4c02d923cce4636c88ac21faa
2021-02-15IVGCVSW-5694 Update Major, Minor release versionsNikhil Raj
* Update Arm NN version in Version.hpp and all guides * Change Project Version in Doxyfile Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I05ab20a1ae5d0376a641df68a5877f97e7609052
2021-02-08IVGCVSW-4901 Add semantic versioning to Parsers and TfLite DelegateMatthew Sloyan
* Added Version.hpp to all Parsers * Added Version.hpp to TfLite Delegate * Updated CMakeLists to use new versions * Added GetVersion method to parsers and TfLite Delegate Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: If29e1e6d9e615f9095ec1c01ad47acfff40b1dd5
2021-02-02IVGCVSW-5619 Enable OptimizerOptions for the python external delegateNarumol Prangnawarat
* Add reduce-fp32-to-fp16, reduce-fp32-to-bf16, debug-data, memory-import options to external delegate * Simplify DelegateOptions * Add test mock models * Unit tests * Configure lfs to manage tflite files Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I1e4db468862ba03d4cb031347bc307cf940b3cb1
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
2021-01-22IVGCVSW-5571 Expose the TfLite Delegate to the TfLite python APIJan Eilers
* Implemented external delegate adaptor interface for TfLite * Activated armnn logging for delegate * Added logging info to indicate if gpu tuning is turned on * Added pytests to ensure functionality of the external delegate adaptor * Included the delegate directory into doxygen * Added documentation on how to use the external delegate in python Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Id3b4588fb0b9ac7e3f47ba2c19feead7beb58e18
2020-11-17IVGCVSW-5377 Add ArmNN TfLite delegate to ExecuteNetworkSadik Armagan
* Added package manger to turn internal calls to find_package into a no-op * Changed delegate cmake so it can now be built within armnn Change-Id: I2a7ecb9a3c1ca05474cd1dccd91498f6f6c0b32e Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
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-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
2020-10-19IVGCVSW-5365 'Create the TfLite Delegate subdirectory in ArmNN'Sadik Armagan
* Created delegate sub-directory under armnn * Created Delegate, ArmnnSubgraph and DelegateOptions classes * Created cmake files. * Integrated doctest (under MIT license) as testing framework Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: If725ebd62c40a97c783cdad22bca48709d44338c