aboutsummaryrefslogtreecommitdiff
path: root/src/backends/neon/workloads
AgeCommit message (Collapse)Author
2022-02-10IVGCVSW-6700 Add override functions to all typed Neon/CL workloadsDavid Monahan
* Neon and CL workloads which inherit from TypedWorkload instead of the BaseWorklod for their backend do not contain the correct ReplaceInputTensorHandle/ReplaceOutputTensorHandle and Reconfigure functions. So they have been added directly. * Removed the Profiling call from ClConvolution2dWorkload::Reconfigure() to avoid a segfault Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: I7b9d1b48fdb17db1662dc03c22acc746340ce73f
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-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-26IVGCVSW-6685-6686 Modify workloads to extend Neon/Cl BaseWorkloadTeresa Charlin
* Neon workloads to extend NeonBaseWorkload instead of BaseWorkload * Cl workload to extend ClBaseWorkload instead of BaseWorkload Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I8f39a31a89a8865ac4acf18573ab290d548d2864
2022-01-26IVGCVSW-6683-6684 Add ClBaseWorkload and NeonBaseWorkloadTeresa Charlin
* Neon/Cl Activation workloads inherit from Cl/Neon BaseWorkload * Unit Test for ReplaceTensorHandle functions Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I985e34b93a96405735402a6d3b947957afbe2857
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-11-18IVGCVSW-6520 Extend pad workload for CpuAcc to support mirror paddingTeresa Charlin
* Add UnitTest for CpuAcc !ComputeLibrary: 6641 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ic96b9e28d133cef73312b4ac793325f5e69b3d4d
2021-11-03Bug Fix in CpuAcc and GpuAcc workload: Gather has 2 inputsTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ifbb9332c78c843c5b937c4e1b50a8f5a75409e73
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-27IVGCVSW-6170 Add CpuAcc Conv3d WorkloadTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I3a5bfef5a0085d172fd3689e67f25af909ace2ee
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-09-29IVGCVSW-3707 Add Channel Shuffle Workload to CpuAcc backendTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I2e3dee3c73fe58c7cfcb3ce3667884202f46e6aa
2021-08-10IVGCVSW-6249 Add ProfilingDetails Macros to all workloads in NeonKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I7be77712a9f790928219ce91222d46cc766ab9dd
2021-08-05IVGCVSW-5980 Add Descriptor, TensorInfo and Convolution algorithm to JSONKeith Davis
* Add GUID as field to layer details and profiling events * Add Optional GUID param to existing tests * Improve Details macro to be inline function * Fix some formatting Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I66f192a90a7642b3ee8e7dda0d3f428cce002581
2021-08-04IVGCVSW-5980 JSON profiling outputKeith Davis
* Add new ProfilingDetails class to construct operator details string * Add new macro which helps append layer details to ostream * Add ProfilingEnabled to NetworkProperties so that profiling can be realised when loading the network * Add further optional info to WorkloadInfo specific to convolutions * Generalise some JsonPrinter functions into JsonUtils for reusability * Remove explicit enabling of profiling within InferenceModel as it is done when loading network * Add ProfilingDetails macros to ConvolutionWorkloads for validation Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ie84bc7dc667e72e6bcb635544f9ead7af1765690
2021-06-16IVGCVSW-6088 Add Sin and Log to ElementWiseUnaryTeresa Charlin
* Ref workload * Cl workload * Neon workload * Serializer * Deserializer * Remove boost include from TensorTest.cpp Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I498548169cc77609c55cf3105f1de5a7429772cf
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-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-05-06IVGCVSW-5815 Generalise ConstCpuTensorHandleJames Conroy
* Generalises ConstCpuTensorHandle and inherited classes by removing 'Cpu' from aliases. * New renamed classes: ConstTensorHandle, TensorHandle, ScopedTensorHandle, PassthroughTensorHandle, ConstPassthroughTensorHandle. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I1824e0e134202735fb77051f20a7252f161dfe16
2021-04-22IVGCVSW-5419 'Add ACL Support for CAST Operator'Sadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I481343af311cf3cbc81eee80e80d8b5581fdfd7b
2021-02-09MLCE-347 'REDUCE_MIN, REDUCE_MAX, REDUCE_SUM Support'Sadik Armagan
* Added TfLiteParser support for REDUCE_MIN and REDUCE_MAX operators * Added ACL workloads support for REDUCE_MIN, REDUCE_MAX, and REDUCE_SUM operators * Added TfLite Delegate support for REDUCE_MIN, REDUCE_MAX, and REDUCE_SUM operators Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I8085d59946bfd4ab78a59a61f899031ae53371a8
2020-12-17IVGCVSW-4625 Add CL Rank WorkloadDavid Monahan
* Added CL implementation of Rank Workload * Removed references to memcpy_s as it's a windows only function Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ia63666b9640d76a775f2ab98b3cd7e9f77b5a507
2020-12-03IVGCVSW-4626 Add Neon Rank WorkloadDavid Monahan
Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I5a85597e75d2b879ae234c6929686fabe99d7bc8
2020-11-30IVGCVSW-5568 Revert "IVGCVSW-5563 Fix Crash on model with FullyConnected ↵Teresa Charlin
Sigmoid Activation" * This reverts commit be25d94aefe53f221304b1f5f344913b708f808b. * Add Unit Test: any receiver layer + any activation layer in float and QAsymmU8 * Tidy up fuse activation tests Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ie059d03b85cd17eaaafe5188bb173672a1fb9ae0
2020-11-19IVGCVSW-5563 Fix Crash on model with Fullyconnected Sigmoid ActivationKevin May
* Add supported activations check to Neon FullyConected validate Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I67a36eb83d0568d000e928e27eba3c84e32cdc72
2020-11-18IVGCVSW-5093 Add NEON Logical workloadJames Conroy
* Add NEON Logical workloads for NOT, AND and OR. * Enable Layer and IsSupported tests on NEON. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: Ibca59530457a664ca3d77751825642f8daf52fab
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-11-12Update ACL pin to d7341fb9e3b24b904edf7ac9d83e1e063bc77765Teresa Charlin
* Use NEConvolutionLayer Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ieb81fafaf34a63be8daf297ebe1bb0e4079daf4e
2020-10-05Update ACL pin to fc2f6d0427e1d886fcccc68867d1af1ccd96608bTeresa Charlin
* Set use_padding to false in neon workload Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ia5367de331efe1d28dea4dfbefc0713720da81f9
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-10-01COMPMID-3784 Fix 1 CTS MUL INT32 failure due to using SATURATETeresa Charlin
* LargeGraph_TENSOR_INT32_Rank4/26 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I9d07444db56e26c13a77bf022938644ed7953d6b
2020-09-25Update ACL pin to 840a72cc745c60eccbd26fe192b035ec68b2ee41Nikhil Raj
* Change tensor to non const to fix build error caused by ACL fix for QLSTM Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I7ab0f644dfb3cb3cf21bda73028e9368f3354f4a
2020-09-17IVGCVSW-5300 Remove some boost::numeric_cast from armnn/backendsMatthew Sloyan
* Replaced with armnn/utility/NumericCast.hpp * Some exclusions in reference backend * Excluded as requires float implementation in NumericCast.hpp Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I9e4e9cd502c865452128fa04415fd6f250baa855
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-09-03Update ACL pin to ec4dee8c68a3d0f6d63db184bfb2f4589429778eTeresa Charlin
* Axis for LogSoftMax and SoftMax can be either positive or negative Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I36b0507ad7600c0a98c3b8be3c0350045ee05b84 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
2020-08-10Update ACL pin to 4aed4aafa2ddb0b6f4b76aef5008c8bb45599ea4Teresa Charlin
* Use axis=-1 in all softmax tests as ACL only accepts this dimension (the most right dimension, in ACL is 0 and in ArmNN is -1). Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I4be83f60aa9505b4bf2367c4489e6f12d644c6d4
2020-07-29IVGCVSW-5167 Use a generic axis in CL/Neon LogSoftmax and Softmax workloadTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Id72d2c2851adcc1dd8f00a6103642b16ebe3a964
2020-07-28IVGCVSW-4973 Enable QLstm projection unit tests on NEONTeresa Charlin
*Cosmetic changes on NeonQLstmWorkload Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I53e00ec31845d4c7d1f00d53d179b8540dcee608
2020-07-24IVGCVSW-3897 Add NEON LOG_SOFTMAX WorkloadKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I632b5ac7f188853de68e232e81568b3fca238d42
2020-07-22Update ACL pin to aa95ddc2abb7cef0b2edd03f7c4c9d9c6b9d7cf4Teresa Charlin
IVGCVSW-5136 Adapt to change in ConcatenateLayer in ACL Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I5bc1752215a7b5a91c449e62809ae06f501c6108
2020-07-08IVGCVSW-5005 Fix Deprecated Functions in CL/NEON Resize WorkloadDavid Monahan
* Update CL pin to f3ad9513dd46fca1d6c5e4550286480fdbaba056 IVGCVSW-5005: Fix Deprecated Functions in CL/NEON Resize Workload * Add missing virtual function to NeonIntercepterScheduler * Update CL/Neon Resize Workloads to use ScaleKernelInfo * Update CL/Neon Resize workloads to set correct Sampling Policy for Half Pixels IVGCVSW-4981: Change CL/NEON Softmax axis value * Default value is now 0 Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I8a14c6a64e5a24bc1a66a7d3685cd388c2245702
2020-07-01IVGCVSW-4903 Connect axis parameter in Gather from android to ACL.Teresa Charlin
!android-nn-driver:3302 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ifbc49acb5272f8a36719bb68676e44817190537d
2020-06-23IVGCVSW-4622 Add NEON FILL WorkloadSadik Armagan
* Added Neon workload for Fill Operator * Enabled Fill operator tests on Neon * NEFill function does not have validate() function yet IsLayerSupported() function return true at the moment * Added INT32 supported type for CpuRef Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I17bf5ec13750f46322a30653e15ba2a514f61f08
2020-06-03remove BOM from filesLaurent Carlier
Change-Id: Ia4b4bb3be0ed6e933c77d58f8e9879b1370e9537 Signed-off-by: Laurent Carlier <laurent.carlier@arm.com>
2020-05-30IVGCVSW-4888 Update Resize Front end for new parametersDavid Monahan
* Added AlignCorners and HalfPixelCenters to Resize and ResizeBilinear * Updated Serializer and Serializer tests !android-nn-driver:3280 Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ice3bb448c239b04323854641525bfe0808c03b2e
2020-05-29IVGCVSW-3846 Add NEON GATHER WorkloadTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I1a66fdad63cef16866d9dfcb8a339647f856e1d4
2020-05-27IVGCVSW-4200 Add CL EXP WorkloadSadik Armagan
IVGCVSW-4203 Add Neon EXP Workload * Added CL EXP operator workload * Added EXP test suite * Enabled EXP tests on ACL and Ref Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I793d31af1b2e3fe86b0bec6d9e5de503c5dab970