aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/layers
AgeCommit message (Collapse)Author
2021-02-12IVGCVSW-4893 Refactor ILayerVisitor using unified interface strategy.Finn Williams
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Id7bc8255a8e3f9e5aac65d510bec8a559bf37246
2021-02-03backends/reference: Add ReduceSum operation supportSadik Armagan
This patch addes ReduceSum operation support for reference backend, which computes the sum of elements across dimensions of a tensor. Changelog v1: - Fix file header descriptions. Chagelog v2: - Fix line limit issue. - Fix type conversion issue. Changelog v3: - Remove tabs. - Modify newly added file headers. Changelog v4: - Symbol on header isn't allowed so drop it from newly added file headers. Changelog v5: - Remove tabs, fix the use of brackets and align lines correctly. Changelog v6: - Add serializer and deserializer support. Changelog v7: - Fix build error add missed code. Changelog v8: - Rename ReduceSumDecriptor to ReduceDescriptor - Update m_KeepDims field data type to bool on ReduceDescriptor - Add ReduceOperation field to ReduceDescriptor - Rename ReduceSumLayer to ReduceLayer - Update ReduceLayer to use ReduceDescriptor - Update ReduceLayer::ValidateTensorShapesFromInputs() function - Rename RefReduceSumWokload to RefReduceWorkload - Update workload to use ReduceDescriptor - Update workload to use Decoders and Encoders - Remove ReduceSum.hpp and ReduceSum.cpp - Added Reduce.hpp and Reduce.cpp - Move Mean.cpp (which is implementing REDUCE_MEAN) functionality to Reduce.cpp - Update RefMeanWorkload to call Reduce function with ReduceOperation::Mean argument - Remove Mean.hpp and Mean.cpp - Update the Serializer/Deserializer ArmnnSchema.fbs for ReduceLayer, ReduceDescriptor, and ReduceOperation - Update Serializer and Deserializer for serializing/parsing ReduceLayer - Added TfLiter parser Sum test for REDUCE_SUM operator - Make corresponding changes on front-end and Ref backend to support REDUCE_SUM operator Changelog v9: - Fixed build errors. Change-Id: I8c8e034f3df73f9565b3c18eff51ecca6c542195 Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
2021-01-28Remove incorrect use of std::vector.reserveJim Flynn
Change-Id: Ic45d4c837eaad8b9f19288d4f3b6e8caa3eaf319 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2020-12-08IVGCVSW-5500 Fix transpose conv InferOutputShapeJames Conroy
* Use kernelShape[0] as channels for outputShape. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I070c7ff68ae365d9505a5eb28c76f9e52da1e5f9
2020-11-27IVGCVSW-5499 Missing validation for zero strideTeresa Charlin
* Convolution * Depthwise Convolution Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I61b356fbffb176e9a05e08d9b6867d082b6712c8
2020-11-18Fix logical vts skipNarumol Prangnawarat
* Add Boolean support for Reshape * Use LogicalUnary factory and data type for LogicalNot Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I8e072fde200b7716556ae67f79616458cf98ff20
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-09IVGCVSW-5091 Add Logical ops frontend and ref implJames Conroy
* Add frontend and reference implementation for logical ops NOT, AND, OR. * Unary NOT uses existing ElementwiseUnary layer and ElementwiseUnary descriptor. * Binary AND/OR uses new layer LogicalBinary and new LogicalBinary descriptor. * Add serialization/deserializion support and add missing ElementwiseUnary deserializer code. * Add additional Boolean decoder in BaseIterator.hpp. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: Id343b01174053a166de1b98b6175e04a5065f720
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-10-28Fix BackendHint missing when cloning a layerNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I550fb59469af39f8fa3415843e973f06b18485e5
2020-10-09IVGCVSW-5291 Fix for Yolov3 producing 0s on NeonDavid Monahan
Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I9331d590e71fc479979c11be9dc750d6435f12bc
2020-10-08IVGCVSW-5363 Add Unmap layer and Unmap workloadJim Flynn
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Signed-off-by: Jim Flynn <jim.flynn@arm.com> Change-Id: Ie5ecfa67e4763d0c058905592fe2e2fd7315f85c
2020-10-07IVGCVSW-5362 Add Map layer and Map workloadJim Flynn
Signed-off-by: Jim Flynn <jim.flynn@arm.com> Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Id2227c58809b84c7a7af61f7c0d88ad7d45ce558
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-15IVGCVSW-5305 AddBroadcastReshapeLayer as optimizerNarumol Prangnawarat
* Remove AddBroadcastReshapeLayer from TfLiteParser * Add AddBroadcastReshapeLayer as optimizer * AddBroadcastReshapeLayer optimizer unit tests * Load-scope dynamic tensor broadcasting unit tests Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I3549e85b71b41cbd4d96c0f1ece7887acbca76d1
2020-08-17IVGCVSW-5114 Enable memory import in TfLiteYoloV3Big AppNarumol Prangnawarat
* Enable memory import in TfLiteYoloV3Big App * Add isMemoryManaged flag to Concat and Splitter layers Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I7e00f5da2a016c09d480b744fb17ea5611af8365
2020-08-17IVGCVSW-5214 Add ARMNN_NO_DEPRECATE_WARN to Concat and Splitter LayersTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I15eeda7d63d134194faa9fa09ff6a23d928b208b
2020-08-17IVGCVSW-5107 Allow Split to use subtensor on x and yKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I2370d260b750f36842c23f08e8a00ccf976d0aed
2020-08-11IVGCVSW-5207 Add to PadLayer the functions to validate and infer shapesTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I63a6da418862b0a843637d73cbe178086f23bc84
2020-08-07IVGCVSW-5108 Allow Concat to use subtensor on x and ySadik Armagan
* Updated ConcatLayer to allow using subtensors on x/y if padding is not required Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I46a8fb9f17b976b76e069bb82614b6628a206717
2020-07-26IVGCVSW-5155 Update Arm NN API to allow for call to shape inferenceFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I0a2babe5b5b09eb81c9900dc3a05071034a0440b
2020-07-10IVGCVSW-4929 Implement ShapeInferenceMethod in all LayersFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I2c2d99f97cf89814140b057a9f93f41b364197f5
2020-07-06IVGCVSW-4624 Add a RANK Reference ImplementationFinn Williams
* Add Rank front end * Add Rank reference implementation * Add Rank serialization support * Add Scalar serialization support Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I06e4a468c2a84e79bae2e6c5348596bbbf853b4b
2020-07-06IVGCVSW-4919 Strided Slice 0 Dimension Tensor FixRyan OShea
* Add check Axis' shrunk to 0 dimensions Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: Ic2544f7538d2df4a561f88ce8909533424fa2a25
2020-07-06IVGCVSW-4920 Invalid Negative Stride fixRyan OShea
* Add check for negative stride with ShrinkAxisMask Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I69ecd2915d94278d6313d8279361c4dc675adb74
2020-07-06IVGCVSW-4988 Add handling output shape parameter to TransposeConvolution2dColm Donelan
* Add m_OutputShape and m_OutputShapeEnabled to TransposeConvolution2dDescriptor. * Update TfLite parser to populate m_OutputShape if found in the model. Handle both Signed32 from tflite files and QAsymmU8 from test fixtures. * Update TransposeConvolution2dLayer to use m_OutputShape instead of InferOutputShapes if specified. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ia6933065375eb8006c916f1ca67c38dc50bc205c
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-26IVGCVSW-4919 Mean VTS/NNT FailuresRyan OShea
* Allow output to be reduced to scalar Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I3b5a392fe70a84814c523a22d6fe3cf19d74f83f
2020-06-26IVGCVSW-4928 Introduce "ShapeInferenceMethod" Option.Teresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I70ef1a9f3cefa1d4cf9220f0e13131d11e7c6418
2020-06-23IVGCVSW-4924 Fix edge case for transposeConv2d shape inferenceFinn Williams
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I0147ad10aeb16cf5c876cbf09434279ba6813714
2020-06-20IVGCVSW-4707 - Add AlignCorners and HalfPixelCenters to ResizeDavid Monahan
* Added AlignCorners and HalfPixelCenters Parameters to Resize * Added Unit Tests Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I83420a9bcb7beec9073d201448f64eb53090e1f1
2020-06-17IVGCVSW-4908 Add Serializer/Deserializer Support for FILL operatorKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Icae26505d0e378ee5ffb3e92b35d78d48b369d2e
2020-06-11IVGCVSW-4906 Add front-end support for FILL operatorRyan OShea
* Added new fill layer * Added visitor tests Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: Iea677014866b4f2d514004623f59ee83f3c0eef8 Signed-off-by: Keith Davis <keith.davis@arm.com>
2020-05-18IVGCVSW-4449 Add missing QLstm nullptr checksJames Conroy
* Adds missing nullptr checks for peephole bias for QLstm. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: Ib04c8352141977cc7ea11a4859f1b11d46472722
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-04-06IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
* Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
2020-04-01IVGCVSW-4531 Tweak to an existing fix for failing NNT tests on Android RDavid Monahan
HAL 1.1/1.2 to account for negative slices Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ia98101b07b826359fb621b801fcbc811d7ec6f6a
2020-03-31IVGCVSW-4590 Fix Lstm layers CellToInputWeightsJan Eilers
* CellToInputWeights were not handeled correctly * Changed CellToInputWeights from Cifg to peephole parameter * Modified exiting unit tests * Added unit test to cover new configuration * Added more descriptive error messages Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ied5dc1253d3df1fd1a79b887a58603d0a9c8f396
2020-03-20IVGCVSW-4549 Add front end for new QLSTM layerJames Conroy
* Added new layer QLstm (Android R HAL 1.3) * Made necessary updates to APIs * Added unit tests * This layer is functionally equivalent to the original unquantized LSTM layer with some additonal quantization features added. Due to this, original LstmParams are used for this layer. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I5b7f2d2fb6e17e81573b41a31bc55f49ae79608f
2020-03-19IVGCVSW-4516 Add ConvertFp32ToBf16Layer and Ref workload supportNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I9099a4f840fb747336f77d20a0868b64e801a310
2020-03-17IVGCVSW-4515 Add ConvertBf16ToFp32Layer and Ref workload supportNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ida6d7e1d2c9abe0618f8b711bab9d62c011090d6
2020-03-13IVGCVSW-4531 Fix for failing strided slice NNT/VTS tests on Android RDavid Monahan
Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I7f6932f0d21b5678ab9822b0fc69f589bbbb07e5
2020-03-10IVGCVSW-4482 Remove boost::ignore_unusedJan Eilers
!referencetests:229377 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ia9b360b4a057fe7bbce5b268092627c09a0dba82
2020-03-02IVGCVSW-4375 Add support for TransposeMike Kelly
* Added TransposeLayer * Added CL, Neon and Ref Workloads * Added Transpose utilities * Added Serializer and Deserializer support * Added Quantizer support Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I04c755ba7cb5b1edf72b3c9f3c0314878032e3c7
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-20Remove use of ArmNN.hpp where it is unnecessary.Matthew Bentham
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I6c90eab1c6bad76d5c7b3bf094998fa4b454bcd1
2019-12-31IVGCVSW-4246 Clean build Layers with -WextraDerek Lamberti
Change-Id: I649cd2304fb0040164763d31a12fc77c6c3bed87 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-17IVGCVSW-4293 Fix multiple Concat issues.Derek Lamberti
* Fix issue with InputLayer or ConstantLayer being used as inputs to Concat. * Fix issue with same input being used multiple times for same Concat. * Fix issue where input is used by multiple concats. Change-Id: Id4819aeec5a40e2afa0351838ba082b9f74aba33 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
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-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