aboutsummaryrefslogtreecommitdiff
path: root/src/backends/neon/NeonBackend.cpp
AgeCommit message (Collapse)Author
2022-02-08Handle optional biases better in Neon/Cl FullyConnected workloadsMatthew Bentham
Use armnn::Optional for optional bias TensorInfos, similar to how it's already done in Convolution etc. Fixes some test failures found using -fsanitize=undefined Change-Id: I7b887e63e2ffab14aeab14415069be738d938ebb Signed-off-by: Matthew Bentham <matthew.bentham@arm.com>
2022-01-25IVGCVSW-6678 Register CopyAndImportFactoryPairs to NeonBackend and unit testsNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: If5392020dfd0caa3f09ea2edbaf0f83ec36ab99b
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-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-10-19IVGCVSW-6310 Update ICustomAllocator and add GetDefaultAllocator function to ↵Francis Murtagh
backends Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: If2879e8a82692285e7fa3f4d09abd608ca28de12
2021-10-02IVGCVSW-5985 Remove deprecated codeJan Eilers
* Removes deprecated AddLayer, IsLayerSupported functions * Marks the whole LayerVisitor class as deprecated not just the constructor. This required to wrap all Accept functions in a no deprecate macro because the LayerVisitor is used as a parameter in there * Removes usage of deprecated LayerVisitor and replaces it with ExecuteStrategy. This required a few structural changes in the unit tests * Adds a default implementation for IStrategy called StrategyBase * Changes pyarmnn to use non deprecated constructor for INetworkProperties and adds related unit test * Marks usage of deprecated code in pyarmnn as deprecated. This required to extend INetworkProperties to allow backwards compatibility * Removes deprecated functions from CpuAcc, GpuAcc and Ref backends Note: This patch breaks compatibility with backends that are not updated in this patch !android-nn-driver:6325 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Id13b6f37a74d26eadeda2da1dc92915e725ed5a5
2021-06-09IVGCVSW-5855 Refactor the reporting of capabilities from backendsFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I05fc331a8e91bdcb6b8a2f32cfb555060fc5d797
2021-05-20MLCE-418 Reduce layer does not support multiple axesMatthew Sloyan
* Added backend specific optimization to chain new reduces layers for each axis to simulate behaviour of a layer with multiple axes. * Added function to calculate reduced output shape. * Added unit tests. * Includes rework to fix IVGCVSW-5987. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I154b3698b5e6756b05b2a0b5a3f0896184efce72
2021-05-07Revert "MLCE-418 Reduce layer does not support multiple axes"Matthew Sloyan
This reverts commit d905decd256558bbee165e636ce4242ac3b9c917. Reason for revert: LargeGraph_TENSOR_FLOAT32/FLOAT16 CTS tests failures Change-Id: Ie69826549e73775825f45134375b5b2c41aebd01
2021-05-06MLCE-418 Reduce layer does not support multiple axesMatthew Sloyan
* Added backend specific optimization to chain new reduces layers for each axis to simulate behaviour of a layer with multiple axes. * Added function to calculate reduced output shape. * Added unit tests. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I180b0b111b7bcf3d0c283f1db0b82d5f17757682
2021-04-02IVGCVSW-5783 'Add AsyncExecution Capability'Sadik Armagan
* Added AsyncExecution to the BackendCapability enum class. * Logged a warning if backends do not support AsyncExecution capability if AsyncNetwork is created. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I49f8467297f4b6b8e414cb6a3638a7d3f1bb886a
2021-01-21IVGCVSW-5616 Don't fuse activation if quantization parameters are differentTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I6504e922113aa9e397f53e570ebcf47e1f133945
2020-11-17MLCE-278-IVGCVSW-5530 FusedActivation issuesMike Kelly
* GetOverriddenDataType was returning incorrect quantization data * Optimized CpuAcc and GpuAcc SubGraphs fail validation on debug versions of ArmNN Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ie97935cc2af67bd9aeebc94b63dafa458bd1aa8c
2020-11-13IVGCVSW-5328-5329 Fuse ActivationMike Kelly
* Added Fused Activation Optimization to both CL and Neon backends. * Added Fused Activation support to all the CL and Neon workloads that support it. * Changed ProfilingTest network to be a Convolution layer followed by an Abs layer rather than an Activation layer. * Added IBackendInternal::OptimizeSubgraphView function that can accept a ModelOptions. * Network will now call OptimizeSubgraphView passing in the ModelOptions. Signed-off-by: Keith Davis <keith.davis@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ib536ac3cbafc7d9b35c139ad9a65b7735262cd9d
2020-10-30IVGCVSW-5322 Fix segfault between Neon and Cl layersNarumol Prangnawarat
* Fallback to memory copy if memory import is not supported * Remove direct compatibility between Neon and Cl Tensors * Unit tests fallback from Neon to Cl and Cl to Neon Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Iec00a77423fb23b37a6b1aefee1b2ec4d649efca
2020-10-02IVGCVSW-5334 Remove remaining boost::numeric_cast from armnnMatthew Sloyan
* Floating point casts now use armnn::numeric_cast. * Also removed remaining header imports. Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I2d37847d67f164fc0a0ae17f34d49ff3d2210c30
2020-09-14IVGCVSW-5157 'Pipe ModelOption through Network::LoadNetwork() to Workload ↵Sadik Armagan
factory' * Pass ModelOptions to WorkloadFactory * Updated signature of CL and NEON Convolution2d workloads added FastMathEnabled param. Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I536178be8e4dd4083489e69febadaf0feeba46d2
2020-09-10IVGCVSW-5156 Introduce ModelOptions to OptimizedNetworkSadik Armagan
* Introduced ModelOptions to IBackendInternal * Introduced ModelOptions to Network * Added FastMathEnabled parameter to Conv2d Validate function in CL and NEON * Added Optimizer tests Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ib54c1e82cb3d89a52756ed499cf91b6a7fdb2063
2020-07-13IVGCVSW-5078 Fix segmentation fault on Yolo V3 Big AppNarumol Prangnawarat
* Register TensorHandleFactories when create Workload Factory Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I6217c6f00d27b67e42b8043cbaf72d9db5789bfb
2020-04-14IVGCVSW-4483 Removes boost::polymorphic_pointer_downcastJan Eilers
* replace boost::polymorphic_pointer_downcast by PolymorphicPointerDowncast * replaced/removed includes Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I0ef934a3804cf05e4c38dec6c4ec49c76111a302
2020-02-07IVGCVSW-4317 Implement the Profiling Context InitialisationColm Donelan
* Call CreateBackendProfilingContext on each backend from Runtime passing an instance of the BackendProfiling interface. * Modify the signature of CreateBackendProfilingContext to remove const and return a shared_ptr to BackendProfilingContext * Add concrete BackendProfiling class. * Store BackendProfilingContexts in Profiling service. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I975eaa2093ae91fa623835f65f9e5b25eb65117a
2020-01-29IVGCVSW-4316 First draft of IBackendProfiling and IBackendProfilingContextColm Donelan
* Introduce two new backend profiling interfaces IBackendProfiling and IBackendProfilingContext. * Add a mechanism to pull a context from a backend through IBackendInternal * Update CL, Neon and Ref backends to return an empty profiling backend. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I6e7438fcb126ad7a073a226862dc44836c9998b7
2019-12-09IVGCVSW-4210 Create a public API for the common backend filesMatteo Martincigh
* Create a public API for the common backend files * Move OutputHandler to armnn internal * Remove unused headers Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3e86d908b021e3561befa9d45158d87d2cbb18c0
2019-10-31GitHub #292 Move BackendRegistry.hpp to the public APIMatteo Martincigh
* Moved to BackendRegistry.hpp include/armnn * Updated makefiles and sources accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I4d83abb581d523218a880c879fcf30c9611f7fd7
2019-08-27IVGCVSW-3605 Add direct compatibility between Cl and Neon backendsJan Eilers
* Adds compatibility between Cl and Neon * Adds related unit test Signed-off-by: Jan Eilers <jan.eilers@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Iaa454ea2a6392c89c0a83836c3156d4ddb354879
2019-08-22IVGCVSW-3656 Make the reference backend optionalMatteo Martincigh
* Made the build of the reference backend depend on a new ARMCOMPUTEREF macro * Made the relevant targets dependent on the ref backend * Moved Cl and Neon static registry initializers to separate files * Wrapped some of the unit tests into proper ifdefs where necessary Change-Id: I7f2c42699682630233a4c4b6aed2f005083de189 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-08-20IVGCVSW-3617 Add CL TensorHandleFactoryJan Eilers
* Adds ClTensorHandleFactory * Includes some refactoring of NeonTensorHandleFactory Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I9f0874b1945050267c5ece970e6d9b200ed8a865
2019-08-14IVGCVSW-3622 Add Neon TensorHandleFactoryNarumol Prangnawarat
Signed-off-by: James Conroy <james.conroy@arm.com> Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9f24f7d97c1e7d37ee7d58ff85c6c3f8496e52ec
2019-05-22IVGCVSW-3132 Reintroduce SubGraph definition, but deprecatedMatteo Martincigh
* Restored old SubGraph class definition as an alias of SubgraphView for backward compatibility * Restored SubGraphUniquePtr * Restored CreateSubGraphConverter method (and the corresponding ISubGraphConverterPtr type) as a deprecated method that's been removed from the backend interface * Chaged the defautl implementation of OptimizeSubgraphView to call the deprecated OptimizeSubGraph * Changed the default implementation of OptimizeSubgraphView in the backends Change-Id: If69903926bf5ff2aae52c9b64b4572b355662757 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-05-03IVGCVSW-3030 Update the backend code to create also a list ofMatteo Martincigh
non-optimized SubgraphViews * Removed pointless CreateSubgraphViewConverter method in the IBackendInternal interface Change-Id: Ie2d3c0e74fb3d53e67f76924ac6d05050a5e6e2e Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-04-30IVGCVSW-2405 Rename SubGraph to SubgraphViewDerek Lamberti
Change-Id: Ie50aeccf053c20c3a01a75042bbc3acd824375af Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-04-29IVGCVSW-2396 Go back to using offset memory managerSadik Armagan
Change-Id: If6cf69b1569eb69c9481369a99ca7066be0fdd9d Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
2019-01-30IVGCVSW-2458 Refactor the Optimize function (Network.cpp) so thatMatteo Martincigh
subgraphs are optimized by the backends * Added a new method OptimizeSubGraph to the backend interface * Refactored the Optimize function so that the backend-specific optimization is performed by the backend itself (through the new OptimizeSubGraph interface method) * Added a new ApplyBackendOptimizations function to apply the new changes * Added some new convenient constructors to the SubGraph class * Added AddLayer method and a pointer to the parent graph to the SubGraph class * Updated the sub-graph unit tests to match the changes * Added SelectSubGraphs and ReplaceSubGraphConnections overloads that work with sub-graphs * Removed unused code and minor refactoring where necessary Change-Id: I46181794c6a9e3b10558944f804e06a8f693a6d0
2019-01-15IVGCVSW-2454 Merge together the pluggable backends work (was in aMatteo Martincigh
separate branch) and master * Brings in all the changes done for the pluggable backends * Added sub-graph support and tests * Added precompiled layer support and tests * Moved BackendSettings to a separate file * Removed the backend-specific code * Ported DebugLayer and associated functionality * Included fixes to make those changes work with master Change-Id: Id7028fa7917527b844628d5aff5732e3d94c0488
2018-12-17IVGCVSW-2386 Work around Compute Library Arm v7 issueMatthew Bentham
per COMPMID-1818 change to using Blob-based memory manager. Will change back when COMPMID-1848 is fixed. Change-Id: I6e22c2edf422202410faa717b330a2c96c3ebbe5
2018-11-13IVGCVSW-2066: Add IMemoryManager and integrate into the backends frameworkAron Virginas-Tar
Change-Id: I93223c8678165cbc3d39f461c36bb8610dc81c05
2018-11-12IVGCVSW-2125 : Consolidate backend registries into oneDavid Beck
Change-Id: I56da4780f8f5fcef7ff01d232d5d61bf299364bf
2018-11-09IVGCVSW-2125 : backends now can return optimizationsDavid Beck
Change-Id: Ieec34224b433e1d2f3bbe66632cd6016cac5498c
2018-11-05Revert "IVGCVSW-2056 + IVGCVSW-2064 : move ClContextControl to the ClBackend"David Beck
This reverts commit d4dfa684941a21314b70593d01b0fc2167eebad4. Change-Id: Id61ce69215505c3cf5d30ec2a7ec9127fb2554fc
2018-11-02IVGCVSW-1946: Remove armnn/src from the include pathsAron Virginas-Tar
Change-Id: I663a0a0fccb43ee960ec070121a59df9db0bb04e
2018-10-26IVGCVSW-2056 + IVGCVSW-2064 : move ClContextControl to the ClBackendDavid Beck
Change-Id: Ice19d3f763298bc14585267df389e99df846320d
2018-10-25IVGCVSW-2067 : dynamically create workload factories based on the backends ↵David Beck
in the network Change-Id: Ide594db8c79ff67642721d8bad47624b88621fbd
2018-10-22IVGCVSW-2037 : separate registry for layer support intrefacesDavid Beck
* because their lifetime is different from backends Change-Id: I9ba525e7e503b148cde1294933f3954b8bad3d68
2018-10-22IVGCVSW-1998 : replace Compute enum in LayerSupport free functionsDavid Beck
!android-nn-driver:153490 Change-Id: I1c2a5f942e3a1c3626e093c90545ca27c64ba5e8
2018-10-22IVGCVSW-1996: Implement CreateWorkloadFactory() across all internal backendsarovir01
Change-Id: If0a2f010a7a45735ea37c07a5ee1f2398afb9b8b
2018-10-22IVGCVSW-1952 : add BackendId class to prepare for the replacement of Compute ↵David Beck
enum !armnn:152674 Change-Id: I1bcdfdfbfb73e502d58f35717e2558e24651013c
2018-10-22IVGCVSW-1989 : implement backend creation and registry for Ref,Cl and NeonDavid Beck
!armnn:152557 Change-Id: Ic6b99cddee1597c85de76034d9332fe1bf3aceb1
2018-10-10IVGCVSW-1963: Add implementation classes for Cl, Neon and Ref backendsarovir01
Change-Id: Ibb2efaf8b001a64a3f35eab2220990dc39889780