aboutsummaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2022-03-02IVGCVSW-6627 Add Backend interface to ABI compliance checkerexperimental/abi-tests-backendFrancis Murtagh
* Test review, breaking front end interface to ensure no regressions Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I2b10ededc5eb2bc65aa8dd94fcf47eb886dc83b2
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-02-24IVGCVSW-6627 Add Backend interface to ABI compliance checkerFrancis Murtagh
* Test review, breaking backend ABI Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Iabb6e4db82bcd2185d1c2ceb4c7215dbd4f41764
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>
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-09IVGCVSW-6582 Remove Optimization.hpp from IBackendInternalNikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: Ie593a5c3882ab8fc7d1d0a4ade30dc69973e6d32
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-12-08Add ModelOptions logging outputJan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I1947924504c1308442b816cff513b2080ed3cc0d
2021-11-23IVGCVSW-6610 No bounds checking performed when indexing PermutationVector ↵Cathal Corbett
elements. * Added out of bounds index error checking to PermutationVector operator[] method in Types.hpp. * Added armnn unit tests to UnitsTests.cpp to check error when using PermutationVector alone and with TransposeDescriptor and PermuteDescriptor. * Added pyarmnn unit test to check error when using PermutationVector. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: Ie5a8090f07b571a6bdf79a8cad621c31cc1891b7
2021-11-18IVGCVSW-6452 'Move CompatibleTypes.hpp to the armnnUtils library'Sadik Armagan
* Moved CompatibleTypes.hpp to include folder * Added implementation file to source CompatibleTypes.cpp Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I94d2bffdb82a0592943f497d4f57972151d9f2db
2021-11-17IVGCVSW-6509 Front End + Reference Workload implementationTamás Nyíri
Subtask of story: IVGCVSW-6164 Add a Pooling3d FrontEnd and Ref Implementation * Add front end * Add reference workload * Add corresponding unit tests Change-Id: Icce4146dd0a06a1da46a2def00a82d343e171750 Signed-off-by: Tamas Nyiri <tamas.nyiri@arm.com>
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-08IVGCVSW-6527 Support the new memory API in loaded networkFinn Williams
* enable external memory management for neon and ref backends * change m_TensorMemoryVector to hold shared pointers * change input layer backend Id to match backend id of connected layer Signed-off-by: Finn Williams <finn.williams@arm.com> Change-Id: I2216a724028312eb101b290df3f224177826b1a0
2021-11-05IVGCVSW-6412 Implement CLBackend ICustomAllocatorDavid Monahan
* Added implementation of ClBackendDefaultAllocator * Added back in some pure virtual functions that were mistakenly removed from the CustomMemoryAllocatorSample * Added a new Gralloc MemorySource for memory which originates from the gpu * Added unittests Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: Id2abb33d82697df36426f5709756c616af3e8ed7
2021-11-03Revert "IVGCVSW-6359 Added support for Float16 (Half) to Execute Network"David Monahan
This reverts commit 2d9956162dd002a41f7fb4fa6753195d33524c7f. Reason for revert: After some discussion, this does technically implement Float16 support for ExecuteNetwork, but not in a way which matches most use cases and is likely to cause issues in the future. Reverting for now. Change-Id: I4ce6de6879216e694631f5dc68e46fb793fae0a9
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-6359 Added support for Float16 (Half) to Execute NetworkDavid Monahan
* Allows the user to specify float16 as a datatype * Does not contain support for float16 on the TfLiteDelegate via ExecuteNetwork Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: Icba56feedab32662e2cf671cc46ada899cf40c6c
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-28IVGCVSW-6513: Compilation failure in armnn-mobilenet-quant in ML-ExamplesFrancis Murtagh
* Move TContainer to armnnUtils library Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I3c0f895d11b66f6ee224ac689a19d0477f990b98
2021-10-28IVGCVSW-5636 'Implement NNAPI caching functions'Sadik Armagan
* Get number of inputs and outputs from optimized network. * Get number of cached files if backend supports caching. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ie02ac123bb7df9b0593a2fe46b5bb564a5994780
2021-10-27IVGCVSW-6469 Add MirrorPad FrontEnd and Ref SupportMatthew Sloyan
* Added PaddingMode enum to PaddingDescriptor to enable Symmetric and Reflect padding. * Added Symmetric and Reflect Ref implementation. * Added Serializer & Deserializer support. * Added unit tests. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I4bed907b31742b32ccefe5e8ca39a6f1e5bd9dee
2021-10-26IVGCVSW-6470 Create MemoryStrategyBenchmarkJim Flynn
* Refactor the strategy library to be more generic * Shorten the names of the current strategies * Change validatorStrat to throw exceptions Change-Id: I0d9c9ef609b2d8675e5788610d1accac6767c660 Signed-off-by: Finn Williams <finwil01@e127804.cambridge.arm.com> Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2021-10-22IVGCVSW-6359 Create a single definition of TContainerDavid Monahan
* Added a single definition of TContainer to include/armnn/Utils.hpp * Change all files which contained their own identical definitions of TContainer to use the new one Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: I63e633693a430bbbd6a29001cafa19742ef8309a
2021-10-20Add ConstTensorsAsInput support for Conv3dMatthew Sloyan
* Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteParser. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added Conv3d EndToEnd test. * Added NCDHW DataLayout and unit tests. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I10cdd354ca5f1c748730f92ffdb36bf810f83c8e