aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-06-23NNXSW-3858: Get non-const IConnectableLayer from I/O slotsNabeel Ahmad
* Added non-const variants of existing const member functions in IInputSlot and IOutputSlot to retrieve non-const IConnectableLayer Signed-off-by: Nabeel Ahmad <nabeel.ahmad@arm.com> Change-Id: Ic3388b578324edb4d2cca36acce6560ad1ce83c5
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-05-18Remove use of PostAllocationConfigure from ExecuteAsync callsFinn Williams
* Resolves: IVGCVSW-6952 Signed-off-by: Finn Williams <finn.williams@arm.com> Change-Id: Ic85bd5267cf94e0ee8461ff4e62b9db3cb80877a
2022-05-18BugFix: Overload Deprecated IsUnidirectionalSequenceLstmSupportedFrancis Murtagh
* Signature change is ABI/API break, overloaded and forwarded to new function. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I8590a6fd65986b5aeff905c1e761cb5c51042e99
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-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-03IVGCVSW-6856 Add GATHERNd FrontEnd and Ref ImplementationTeresa Charlin
* Add front end * Add reference workload * Add unit tests * Add EndToEnd test Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I4cebd17b18476df86162e2dda3366c10e80bd2f8
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-04-11IVGCVSW-6707 Enables a bare metal compileJim Flynn
Change-Id: Icc2f83c5f27f413758fee3e5c1445e9fc44f42c8 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-04-01IVGCVSW-6732 Tests surrounded in '#if defined(ARMNNREF_ENABLED)' in ↵Cathal Corbett
android-nn-driver do not execute. * Change to src/backends/cl/workloads/ClLstmFloatWorkload.cpp fix LstmTests_GpuAcc tests. * Change to src/backends/cl/workloads/ClConvertFp16ToFp32Workload.hpp & ClConvertFp32ToFp16Workload.hpp fix MeanTests_GpuAcc and Convolution2DTests_1.1 tests. * Added UnitTests to src/backends/cl/test/ClImportTensorHandleTests.cpp to test import on Convert Layers. !android-nn-driver:7264 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I0c46dc4b9c54eca8771ab12ed0302b6224606957
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-16IVGCVSW-6852 Break the remaining dependencies on Arm NN in the profiling codeJim Flynn
Change-Id: I18b8ca22896567904768170350ee5eb22edd4a22 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-14IVGCVSW-6847 replace armnn:Optional with arm::pipe::Optional in profiling codeJim Flynn
Change-Id: I048c538d4f8c21770aec2b2751c934d9fa15a4dc Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-09IVGCVSW-6821 Remove dependency on armnn::Exception classes from the ↵Jim Flynn
Profiling code Change-Id: Id46a9a0576091df21b2af5b472f1ca5c6335e8a3 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-08IVGCVSW-6772 Eliminate armnn/src/backends/backendsCommon/test/MockBackend.hppCathal Corbett
Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ie99fe9786eb5e30585f437d0c6362c73688148db
2022-03-08IVGCVSW-6820 Remove dependency on Runtime.hpp from IBackendProfiling and ↵Jim Flynn
IBackendProfilingContext Change-Id: I9ea1da47198a2d60d1a2b81905083d1dfe6b90d5 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-03IVGCVSW-6811 replace ProfilingService includes with IProfilingServiceJim Flynn
Change-Id: I00521756c8a19d10bfdc98c6ef4204c7f84901c6 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-03-01IVGCVSW-6602 Put ArmnnTestUtils under abi-compliance checking.Teresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I82f3bd99b3c1d4d8a013b1e987a533a8071fbeea
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-16Refactor Forced ImportFinn Williams
* Find and replace all workloads associated with imported IO * Only attempt tensorhandle replacement if supported by all workloads * Add new RefBaseWorkload to enable forced input for ref backend * Store imported tensorhandles in preImportedTensorhandles instead of outputHandles * Create pre-imported tensorhandles at network load-time * Front load import workload validation to load network time * Only call ReplaceTensorHandle when needed Change-Id: I3816a71b7f57ae90388bb16462a75d4ef3544fa7 Signed-off-by: Finn Williams <finn.williams@arm.com>
2022-02-16IVGCVSW-6399 Remove deprecated code 22.02 (FullyConnected)Francis Murtagh
* Remove deprecated INetwork::AddFullyconnectedLayer() taking weights as argument as they are now taken as separate input layers. * Updated test that was using the deprecated function. * Remove calls in pyarmnn Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Ibc52ac7fa57afd9033eb226bbc24a09e88a7d361
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-11Fix unit test where NeonMemoryManager was used instead of RefMemoryManagerMatthew Bentham
Although the Neon and Ref backends can use each other's TensorHandles, their TensorHandleFactories can't use each other's MemoryManagers. Incorrectly passing the NeonMemoryManager to the RefTensorHandleFactory in unit test utility code resulted in an incorrect static_pointer_cast and a warning from the Undefined Behaviour Sanitizer. This change fixes the test code, and replaces use of static_pointer_cast with armnn::PolymorphicPointerDowncast which will check that the cast is legal in debug builds. Also, remove MockWorkloadFactoryHelper.hpp as it is unused. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I2b425e86fccacd7cc5ff186521fc6e53e7e50c77
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-07IVGCVSW-6711 Async Execute Test fails on 32bit raspiRyan OShea
* Replace memory area with vals in tensor creation Signed-off-by: Ryan OShea <ryan.oshea3@arm.com> Change-Id: Id92173a515e643d14bd9e24eac1cb834ae55bd1e
2022-02-06IVGCVSW-6747 Call Cl sync after EnqueueWorkloadNarumol Prangnawarat
* Add AfterEnqueueWorkload to IBackendContext * Implement AfterEnqueueWorkload in ClBackendContext to call Cl sync * Set allocated data on outputhandler only once * Handle PreImportedHandles and CurImportedId the same way as Async Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9f59d57e298d4a494569faec3078d66af799f77b
2022-02-03IVGCVSW-6634 SubgraphView: Add method of returning a GetSubgraphWorkingCopyFrancis Murtagh
* Add pointer to SubgraphView allowing it to store a working copy implementation of its own representation of graph. * Make SubgraphView a friend of Graph to allow access to layers. * Add constructor to SubgraphView taking SubgraphViewWorkingCopyPtr * Rewrite Graph::SubstituteSubgraph for use on SubgraphView * Add GetWorkingCopy() method * Add tests for replacement of multiplication with DepthwiseConv2d * Check GetBackendHint() has value before passing to PrecompiledLayer * Add GetOwningIConnectableLayer to IInputSlot to allow traversing from IConnectableLayer->IOutputSlot->IInputSlot->IConnectableLayer Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Iaaef14448d8b73867eaee9d69f4f98d5d1bf171c
2022-02-03IVGCVSW-6724 Accessing ConstTensors from IConnectableLayerNikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I01f42a520d15c6dabd2f77c7715c91b8f7026476
2022-02-03IVGCVSW-6635 Expose a new MockWorkloadFactory and MockMemManager (Part 1)Colm Donelan
* Create a MockBackend in armnnTestUtils. * Create corresponding WorkloadFactory, TensorHandle, TensorHandleFactory MemoryManager and WorkloadFactoryHelper classes. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I884731b109bc623a7272e5ad333ff754f8c13ae1
2022-02-02IVGCVSW-6639 Add GetParameters to IConnectableLayerJim Flynn
Change-Id: Id55a460ecb510f5b30235b03f54390f2c8188fc2 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2022-01-31IVGCVSW-6552 Add support of aligned host memoryNarumol Prangnawarat
* Add AllocatedData functions to OutputHandler * Enable import aligned memory in ImportInputs * Enable import aligned memory in ImportOutputs * Allow to import input and output if the memory is aligned * Implement Reconfigure function on ClConvolution2dWorkload * End-to-end test on Ref and Cl to ensure that input and output memory are imported when aligned Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9e5e4c26d1ac2f1d806803ade5f64c6479c51718
2022-01-27IVGCVSW-6739 'Issues on Logging API'Sadik Armagan
* Enabled using same instance of SimpleLogger * Removed some trailing new lines on some log messages Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I4b917c0ca5011afc9b39dad50715290ba15a1246
2022-01-26IVGCVSW-6739 Fix logging bug where blank messages were being sentRob Hughes
The ScopedRecord class sends its message to its sinks in its destructor. The StartNewRecord() method was creating a local ScopedRecord variable, returning a (move-initialised) copy of this, and then destroying this local variable (as the variable goes out of scope at the end of the function). That destruction was causing an empty log message to be sent to the sinks, which was not intended. This patch fixes this by making the move constructor of ScopedRecord disable the moved-from object, so that it does not send its message upon destruction. Change-Id: I435d96074698575ed3445fed2597c115b83701fd Signed-off-by: Rob Hughes <robert.hughes@arm.com>
2022-01-24Bugfix: Set removal date for Backend API stability items to 22.11Francis Murtagh
* This is to allow EthosN more time to adjust to new API. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I7da32a7317827dfa619c74fc8801447e7172e7c8
2022-01-20Bugfix: Add default Implementation for ILayerSupport deprecated APIFrancis Murtagh
* This saves new backend implementing old and new pure virtual functions only to have to remove their implementations of our old api when we remove in 22.08. * Make deprecation warnings more descriptive. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I36c34c3c85f1c359e0b6974866e70edf0bbb4227
2022-01-19IVGCVSW-6712 Move SubgraphView to backends include folderFrancis Murtagh
* Make subgraphview a public interface for backends. Change-Id: I615a29ffec41e947215c3d29c2d7d214e327fb90 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2022-01-19IVGCVSW-6629 Stabilize the ILayerSupport interface with unified strategy.Cathal Corbett
* New Virtual Function Added. * Implemented in Ref Neon CL with switch statement for all layers. * Deprecate original IsXXXLayerSupported functions. * Ensure Npu not broken with change. Change-Id: Icf61b16beec83d6af1cb287e24ab1e98a6138c8c Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
2022-01-18IVGCVSW-6682 Add ReplaceTensorHandle functions to IWorkload and BaseWorkloadTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I9f80b9f45206db920568e28e363fcb60f5c0819a
2022-01-18IVGCVSW-6641 Stabilize the IWorkloadFactory interface with unified strategyTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ia941be9bf2c15fe56e49a9b9a2bbe943a8152438
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
2022-01-12Fix INetwork::AddPrecompiledLayer to take the CompiledBlobPtr by value ↵Cathal Corbett
rather than reference. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I4057d2d6055220bb0d415a934ac09688b699b77c
2022-01-05IVGCVSW-6671 Add CanBeImported to ITensorHandleNikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: If32049f6c101871eb7c94d8e9d9a4688f45ace5a
2021-12-23IVGCVSW-6632 OptimizationViews: has INetwork rather than Graph for holding ↵Cathal Corbett
layers * Deprecate the GetGraph() function in OptimizationViews & remove/fix occurances where OptimizationViews.GetGraph() is called. * OptimizationViews has member INetworkPtr. * OptimizationViews has GetINetwork() method. * Unit test added to OptimizationViewsTests.cpp. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ifc1e53f1c34d786502279631942f0472f401038e
2021-12-17Remove deprecated code for 22.02Jan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I9114288e705936b12129b01bfd482bbe1260f80b
2021-12-15IVGCVSW-6626 Promote backend headers in backendCommon to armnn/backendsColm Donelan
Move the following header files from backendsCommon to armnn/backends. * MemCopyWorkload.hpp * TensorHandle.hpp * Workload.hpp * WorkloadData.hpp * WorkloadFactory.hpp Replace them with forwarding headers and a pragma deprecation message. Resolve the deprecation messages in Arm NN code. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: I47f116b30f86e478c9057795bc518c391a8ae514
2021-12-14IVGCVSW-6630 Add new method AddPrecompiledLayer() to INetworkCathal Corbett
* Add new method AddPrecompiledLayer() to INetwork with Comments noting it is for backend users. * Added unit test to SubgraphViewTests.cpp. * Bug fix and code refactor in Graph.cpp specifically around Graph::SubstituteSubgraph(SubgraphView& subgraph, IConnectableLayer* substituteLayer) Change-Id: If2d816e5109e48ce920bf92d8823b39130c23a16 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>