aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/CreateWorkload.hpp
AgeCommit message (Collapse)Author
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
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-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-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-08-06IVGCVSW-6119 ConstTensorsAsInput: FullyConnectedMatthew Sloyan
* Constant weights and biases are now stored as Constant layers. * Updated Serializer, Deserializer and unit tests to reflect this. * Updated TfLiteDelegate, TfLiteParser and OnnxParser. * Updated Schema with IsConstant and ConstantTensorsAsInputs. * Updated Ref backend to handle constant weights and bias as inputs rather than reading from member variables. * Added dynamic or constant input EndToEnd tests. !android-nn-driver:5959 Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: Ibf3cf437df1100e4b322b0d303c575c6339f9696
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-06-11IVGCVSW-5963 'Move unit tests to new framework'Sadik Armagan
* Used doctest in ArmNN unit tests Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Ia9cf5fc72775878885c5f864abf2c56b3a935f1a
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-02-15IVGCVSW-4873 Implement Pimpl Idiom for INetwork and IOptimizedNetworkFrancis Murtagh
!android-nn-driver:5042 Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: Ia1ce8b839e81b46428ba0f78463e085e5906958d Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com>
2020-11-09IVGCVSW-5327 Add to Layer a binary blob to host the activation layer infoKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I0a07dea96a86849701ba387dbea148909a6d729b
2020-09-22IVGCVSW-5318 'Create a Neon/CL Workload Unit Test fast_math option enabled'Sadik Armagan
* Unit test implemented to make sure it returns WINOGRAD * Updated the enable-fast-math option in ExecuteNetwork to be consistent Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Id64f114ae47966def69a9eef0770a4251ee56a41
2020-09-17IVGCVSW-5303 Remove some boost::numeric_cast from rest of ArmNNMatthew Sloyan
* Replaced with armnn/utility/NumericCast.hpp * Exclusions in TypeUtils.cpp and QuantizerVisitor.cpp * Excluded as requires float implementation in NumericCast.hpp Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Change-Id: I5c4c60e7028e1a51bf9379457278d253fd37bc70
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-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-24IVGCVSW-3897 Add NEON LOG_SOFTMAX WorkloadKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I632b5ac7f188853de68e232e81568b3fca238d42
2020-05-02IVGCVSW-4449 Add QLstm ref implementationJames Conroy
* Adds ref implemenation for new HAL 1.3 operator, QLstm. * Adds Layer and CreateWorkload unit tests. * Adds WorkloadData validate for QLstm. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I8a721f07ff06105e6495a1a0561b9503aa8146dc
2020-04-30IVGCVSW-4753 Fix CpuAcc Hal 1.3 Softmax FailuresSadik Armagan
* Refactor Neon Softmax workload to accept supported data types Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I54aa72d5cbb862cafcc1eabe48f6a00d61050cd7
2020-04-10IVGCVSW-4483 Remove boost::polymorphic_downcastJan Eilers
* exchange boost::polymorphic_downcast with armnn::PolymorphicDowncast * remove unnecessary includes of boost::polymorphic_downcast Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ie603fb82860fe05fee547dc78073230cc62b2e1f
2020-03-10IVGCVSW-4482 Remove boost::ignore_unusedJan Eilers
!referencetests:229377 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ia9b360b4a057fe7bbce5b268092627c09a0dba82
2020-01-23IVGCVSW-4259 Add frontend and reference workload for UnaryOperationLayerjosh minor
* Added new layer named ElementwiseUnary * Deprecated existing Abs/Rsqrt layer functions * Updated existing Abs/Rsqrt test infrastructure to use new layer * Added boilerplate for new Exp,Neg,Sqrt elemwise op layers * AbsQuantize test removed pending future commit * Serialization support added !android-nn-driver:2550 Change-Id: Ic595c645925e17b45db568187fd05646daf2e87f Signed-off-by: josh minor <josh.minor@arm.com>
2020-01-13Rename quantized data types to remove ambiguity for signed/unsigned payloadsDerek Lamberti
!android-nn-driver:2572 Change-Id: I8fe52ceb09987b3d05c539409510f535165455cc Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2020-01-07IVGCVSW-4246 Enable -Wextra by defaultDerek Lamberti
!referencetests:218340 Change-Id: If24a604310d0363b1f09b406e4d53ebfeb106aad Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-31IVGCVSW-4246 Clean build Layers with -WextraDerek Lamberti
Change-Id: I649cd2304fb0040164763d31a12fc77c6c3bed87 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-11-29IVGCVSW-4209 Create a public API for the ArmNN UtilsMatteo Martincigh
* Moved the relevant armnnUtils headers to the new location: include/armnnUtils * Update the header usage throughout the source code !android-nn-driver:2387 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I2ba15cebcacafad2b5a1a7b9c3312ffc585e09d6
2019-09-10IVGCVSW-3829 Add CL workload for RSQRTAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Idf40ed0ebf2af3170137bf3a3cb5a9635a203d4a
2019-08-06GitHub #240 Fix bias shape in CreatePreCompiledWorkloadTest()Aron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I10b8d5e2e95eb8f48a6be29005136459c3da2957
2019-08-05IVGCVSW-3342 Add CL backend support for Quantized_LSTM (16bit cell state)Ferran Balaguer
!android-nn-driver:1685 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com> Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: I17278562f72d4b77e22c3af25bf7199b9150a765
2019-08-02IVGCVSW-3470 Add Quantized_LSTM testsJames Conroy
* Added Layer and Create Workload tests for the new Quantized LSTM layer. * Tests to be enabled on NEON and CL in their respective patches. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I7e9e9768dd63010ab58367c45fffcff452377cfb
2019-08-01IVGCVSW-3539 Add CL support and tests for StackMatthew Jackson
* Added CL backend support for Stack * Added unit tests for Stack on the CL backend * Refactored unit tests to support generic data types Signed-off-by: Matthew Jackson <matthew.jackson@arm.com> Change-Id: I38ee3e9d8947ea98a3104c982698001e704d7d89
2019-07-26IVGCVSW-3554 Update workloads to pass Softmax Axis Parameter to BackendsFrancis Murtagh
* Add check in CL and Neon to ensure axis is 1 otherwise return unsupported. * Edit CreateWorkload test and JsonPrinter test to ensure axis of 1. Change-Id: I499b405532e26fefc2dd1c18b6dc6005813b5604 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-07-17IVGCVSW-3419 Add reference workload support for the new Stack layerMatthew Jackson
* Added reference workload for the Stack layer * Added factory methods * Added validation support * Added unit tests Signed-off-by: Matthew Jackson <matthew.jackson@arm.com> Change-Id: Ib14b72c15f53a2a2ca152afc357ce2aa405ccc88
2019-07-09IVGCVSW-3391 Add SpaceToDepth CreateWorkload and EndToEnd testsJames Conroy
* Refactored existing EndToEnd tests, moved tests in reference to backendsCommon. * Enabled EndToEnd tests for CL. * Added new Ref/CL CreateWorkload tests. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I0a5e52961a8aca540d43241a3805d19c9c6ff56c
2019-07-02IVGCVSW-3382 Deprecate ResizeBilinear and use Resize with Bilinear methodAron Virginas-Tar
!android-nn-driver:1451 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Ieedbce1f6e95891137a250fdd07e2f7e4e1f4828
2019-06-26IVGCVSW-3249 Extend the BatchToSpace workload to support QSymm16Francis Murtagh
* Add reference supportedness validation checks. * Call unit tests with QSymm16 data type. Change-Id: Ie6621ca7072dfc69278198c53e09b090275a7fff Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-06-25IVGCVSW-3334 Refactor BatchToSpace tests to be genericFrancis Murtagh
* Generify and reformat test BatchToSpace tests * Add missing RefCreateWorkload test Change-Id: I08af018c07ee41df5b9d1e578d99bc03f38090ac Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-06-24IVGCVSW-3277 Refactor TensorHandle factory APIDerek Lamberti
* Added backend support for multiple types of TensorHandle factories * Refactored the backend API to enable new tensor strategies * Added mechanism to determine memory strategies during optimization * Perform mem-copy only when Direct access is not found * Explicitly deleted the copy-constructor from OutputSlot to prevent accidental local copies that would cause the DisconnectAll to be called by the destructor Change-Id: I7e812c8e5e6c1c20db1c5932749ac70fd93db7f8 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com> Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-06-24IVGCVSW-3267 Add more code coverage to the PReLU layerMatteo Martincigh
* Added more unit tests to cover all code branches * Moved the InferOutput tests to separate files * Created convenience ARMNN_SIMPLE_TEST_CASE macro * Created TestUtils file for common utility functions Change-Id: Id971d3cf77005397d1f0b2783fab68b1f0bf9dfc Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-06-19IVGCVSW-3268 Add Reference workload support for the new Prelu Activation layerMatteo Martincigh
* Added reference workload for the PReLU Activation layer * Added factory methods * Added validation support * Added Int16 support * Added unit tests Change-Id: Ic950d908c5e0a335dccd2960a3ffab0f8b599876 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-06-14MLCE-121 Github: Build error on GCC 9Mike Kelly
* Fixed an error encountered when building on GCC 9 error: moving a local object in a return statement prevents copy elision * Fixed failures in unit tests due to std::initializer_list handling in GCC 9 Change-Id: I4bfdd2113dfedcecd29479ee556e4ae22278755d Signed-off-by: Mike Kelly <mike.kelly@arm.com>
2019-06-04IVGCVSW-3212 Refactor the Reference BatchNormalization workloads toMatteo Martincigh
handle Float32 and QAsymm8 types * Removed the type-specific workload implementations * Added type-independent RefBatchNormalizationWorkload implementation * Reworked BachNormImpl to use decoders/encoders * Improved the validation of the BatchNorm queue descriptor * Fixed unit tests where necessary Change-Id: Icf3fa1332292d38ec2fa0b1cb984cab78426034b Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-06-04IVGCVSW-3215 Add CreateWorkload test for Rsqrt Fp32nikraj01
Change-Id: Iea6edf90148773b12f361bfa4b1d572c5322d18b Signed-off-by: nikraj01 <nikhil.raj@arm.com>
2019-05-28IVGCVSW-3119 Rename MergerLayer to ConcatLayerJim Flynn
!android-nn-driver:1210 Change-Id: I940b3b9e421c92bfd55ae996f7bc54ac077f2604 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-20IVGCVSW-3125 Deprecate CreateMergerDescriptorForConcatenation functionJim Flynn
!android-nn-driver:1183 Change-Id: Ia69995b7f09cb86b64611e8efd315413e3064ca1 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-20IVGCVSW-2967 Support QSymm16 for Constant workloadsNina Drozd
* Validate that output is any of supported types in WorkloadData * Validate that output is any of supported types in RefLayerSupport * Add test for constant with QuantisedSymm16 in LayerTests * Add test for creating constant workload in RefCreateWorkloadTests * Add test for constant with QuantisedSymm16 in RefLayerTests * Refactor RefConstantWorkload - BaseWorkload instead of TypedWorkload * Refactor RefConstantWorkload - remove m_RanOnce, use PostAllocationConfigure() Signed-off-by: Nina Drozd <nina.drozd@arm.com> Change-Id: Ic30e61319ef4ff9c367689901f7c6d498142a9c5
2019-05-14Use the new deprecation APIMatteo Martincigh
* Used the new ARMNN_DEPRECATED_MSG macro instead of @deprecated * Refactored the code to no longer use the deprecated methods where applicable !android-nn-driver:1126 Change-Id: Ib0578d3d6fc5a763f5fb922f67ba91fafc7796f6 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-05-03IVGCVSW-3029 Remove any AddLayer capabilities from SubgraphViewMatteo Martincigh
* Removed the reference to the parent graph in SubgraphView * Removed the AddLayer method in SubgraphView * Updated the code where necessary to adapt to the new changes in SubgraphView * Fixed a check in the CreatePreCompiledWorkloadTest test function Change-Id: I4d3af87f11ec3cd8f18a21b250a2d295da56e1a0 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-04-10IVGCVSW-2947 Remove boost dependency from include/TypesUtils.hppAron Virginas-Tar
!android-nn-driver:968 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I03ccb4842b060a9893567542bfcadc180bbc7311
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
2019-01-04MLCE-77 Depthwise Convolution with depth multiplier > 1 doesn't workMatteo Martincigh
* Unified ArmNN's weight format to [ M, I, H, W ] for the depthwise convolution * Added conversion utilities to permute/reshape the weights as appropriate when using CL and Neon backends * Updated the reference implementation of the convolution * Updated the relevant unit tests accordingly !android-nn-driver:459 Change-Id: I07d0818efa9d1ca1e5dad82983aac1fe78eadb18
2018-12-05IVGCVSW-2264 Move DataLayoutIndexed to armnnUtilsMatteo Martincigh
* Since DataLayoutIndexed is now required in the TF parser, this changes move it to the armnnUtils library so that it'll be accessible by the armnnTfParser * Modified CMake files and Android.mk files accordingly Change-Id: Ie2620359ef288aeff64cb9e9bec068a466eee0e9