aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Layer.hpp
AgeCommit message (Collapse)Author
2023-08-02IVGCVSW-7933 Deprecated code: remove forwarding headers for moved headersTracy Narine
* Removing deprecated headers that were added in 22.02 * Fixed a few locations where the forward header was still used Signed-off-by: Tracy Narine <tracy.narine@arm.com> Change-Id: Ied42d0ecc750adadfbc053e0a3133d346f1ab343
2023-07-31MLCE-1092 Add Names to WorkloadsMike Kelly
* Added names to Workloads. * Workloads will be given the name of the Layer that created them. * Added new profiling macros to CL Neon and Ref that add the workload name to the event label * Updated workloads to use new macros. * Added missing profiling to Rank Workloads. * Fixed issue where ClConvolution2dWorkload was being reported as Undefined rather than GpuAcc. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I0a55eab6c2f455b73943aca8e99a247c3cb2a906
2023-07-14IVGCVSW-7830 Add backend optimizations to remove Reshapes where possibleMike Kelly
* Added optimization to remove reshapes for Neon and Ref Backends by using overridden TensorInfos * Added ability to delete Subgraphs during Optimization * Fixed naming error in NeonEndToEndTests and CLEndToEndTests * Added LayerNameAndTypeCheck for testing. * Fixed error where layers were not marked as altered when removed in CLBackend Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I1ac25cd4ec9821470d961831ae2c8d24882276cc
2023-07-03IVGCVSW-7828 Add an Optional TensorInfo to InputSlotMike Kelly
* Updated calls to use the new function From: GetInputSlot(n).GetConnection()->GetTensorInfo(); To: GetInputSlot(n).GetTensorInfo(); * Added UnitTests Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I43184cc05e4472011b9347aaa820eb8deb1cd4a0
2023-02-28Add constant version of IConnectableLayer::GetConstantTensorsByRefMatthew Bentham
This makes it easier to use, particularly in backends where it is common to pass around const pointers to IConnectableLayer. The non-constant version is rewritten to use the constant version. Signed-off-by: Matthew Bentham <matthew.bentham@arm.com> Change-Id: Id3a8384447e93c213299a85ade9a667df5960534
2022-12-12Optimize the calling of IsLayerSupported().Cathal Corbett
* Done as part of 22.11/23.02 innovation days. * IsLayerSupported() is called in model prepare (delegate, android-nn-driver and shim/support_library) and again in ArmNN once model otimization is performed. * From calling IsLayerSupported() the first time, we should know that the layers are supported and what backend they are supported on. * Solution is to set the BackendId of the IConnectableLayer when IsLayerSupported() is called the first time, * In the Optimize() function we then check if the backend is set. If so, we do not call IsLayerSupported() again. * In the case a layer that is supported gets optimized, then the BackendId of that layer get set to "Unknown" for the new optimized layer and IsLayerSupported() will get called on the newly optimized layer. * Includes bug fix IVGCVSW-7213 for Android Mean FP16 CpuAcc tests. Also related to bug IVGCVSW-7211. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I7a7820d0cdb079ffb5a3a2e0c44e252f652df53b
2022-07-08IVGCVSW-7034 Modified SubgraphView returned by GetWorkingCopy()Francis Murtagh
* Add virtual GetSlotIndex to IInputSlot * Fix logic in GetWorkingCopy to use index of slots; so as not to add slots to cloned subgraphView if not in original subgraphView * Add test to cover cases when not all inputSlots to subgraphView layer are part of the original subgraphView * Mark SubgraphView::GetWorkingCopy() as const Change-Id: I1d540f84c57f97f6c834ec06ca13393ffa55d379
2022-06-27IVGCVSW-6981 Remove deprecated code 22.05 [Post Release]Nikhil Raj
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Change-Id: I9ccaefbe28ea572e9e2b4a2168574804667f7460
2022-06-23NNXSW-3858: Get non-const IConnectableLayer from I/O slotsNabeel Ahmad
* Added non-const variants of existing const member functions in IInputSlot and IOutputSlot to retrieve non-const IConnectableLayer Signed-off-by: Nabeel Ahmad <nabeel.ahmad@arm.com> Change-Id: Ic3388b578324edb4d2cca36acce6560ad1ce83c5
2022-05-18IVGCVSW-6929 Support for models with implicit expandedMike Kelly
dimensions * Added allow-expanded-dims to TFLite parser and ArmNN delegate * If true ArmNN will disregard dimensions with a size of 1 when validating tensor shapes. Tensor sizes must still match. * This allows us to support models where tensors have expanded dimensions (i.e. extra dimensions with a size of 1). * Fixed bug in Network where it assumed that only the first option could be ShapeInferenceMethod. * Fixed bug where m_ShapeInferenceMethod was lost when copying or moving Graphs. * Changed Delegate to pass "infer-output-shape", "allow-expanded-dims" and other BackendOptions through to the Network during construction. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ibe7c5ae6597796fc9164cb07bd372bd7f8f8cacf
2022-02-09Fix some build failuresRob Hughes
* Add ARMNN_DLLEXPORT to static symbol that needs to be exported from armnn * Add missing <numeric> header for std::iota Change-Id: Ica0211ed0065e9723bcb8e9dff511acb4ea50288 Signed-off-by: Rob Hughes <robert.hughes@arm.com>
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-02IVGCVSW-6639 Add GetParameters to IConnectableLayerJim Flynn
Change-Id: Id55a460ecb510f5b30235b03f54390f2c8188fc2 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
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-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-05-08IVGCVSW-5818 Enable import on GPUNarumol Prangnawarat
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I4e4eb107aa2bfa09625840d738001f33152e6792
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-29IVGCVSW-5819 5820 5821 Add MemorySourceFlags to ↵Francis Murtagh
TensorHandleFactoryRegistry::GetFactory * Modify Layer::CreateTensorHandles to include MemorySource * Modify INetworkProperties to add MemorySource * Disable Neon/Cl fallback tests until full import implementation complete Change-Id: Ia4fff6ea3d4bf6afca33aae358125ccaec7f9a38 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2021-04-07Fix graph copy memory spikeFinn Williams
* Change layer storage of ConstTensors to std::shared_ptr<ConstCpuTensorHandle> * Change clone to share ConstTensor rather than copy * Remove uses of non-const GetTensor() call * Reduce scope of non-optimized network in ExeNet, so memory can be released after use Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: Ibb2c7309d12411d21405bd6024c76bcdf5404545
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
2020-11-17IVGCVSW-5535 Extend dump file with info about fused layersMike Kelly
* Add optional ActivationDescriptor information to SerializeLayerParameters Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I6268932cdc4637cdb30948e1b7f0f0649ba18492
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-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-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-06-26IVGCVSW-4928 Introduce "ShapeInferenceMethod" Option.Teresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I70ef1a9f3cefa1d4cf9220f0e13131d11e7c6418
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-03-03IVGCVSW-4314 Per-layer backend hint APIDerek Lamberti
Change-Id: I6ddcffe792e39b17fcdb8af7f13f4a689ef8019d Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2020-02-11Silence clang-8 warnings wrt explicit defaulting of implicitly deleted operatorMatthew Bentham
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I9ff918e7f9fe340e65f8dd1b1c47754c8b41de1f
2019-12-31IVGCVSW-4246 Clean build Layers with -WextraDerek Lamberti
Change-Id: I649cd2304fb0040164763d31a12fc77c6c3bed87 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-09-24IVGCVSW-3623 Implement NeonTensorHandle::ImportDavid Monahan
Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I7213788725fd4e4cf1176998604e999d0b7ed6cc
2019-09-04IVGCVBENCH-1337 Added additional layer parameters to dot file and -v optionAndre Ghattas
* Generic layer parameters now show up in dot file * Convolution layer parameters have also been added to dot file * ExecucteNetwork has an additional -v flag which generated dot file if there Change-Id: I210bb19b45384eb3639b7e488c7a89049fa6f18d Signed-off-by: Andre Ghattas <andre.ghattas@arm.com> Signed-off-by: Szilard Papp <szilard.papp@arm.com>
2019-08-05IVGCVSW-3277 Mem export/import suppor for TensorsDerek Lamberti
* Rename MemoryStrategy to EdgeStrategy * Add MemImportLayer * Import memory rather than copy when possible Change-Id: I1d3a9414f2cbe517dc2aae9bbd4fdd92712b38ef Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-07-30IVGCVSW-3581 Fix AddCopyLayers and associated testsMatthew Bentham
Take a copy of the MemoryStrategies for a layer before inserting new connections. Use the copy when looking up the original MemoryStrategies during the graph transformation. Fix the unit tests for AddCopyLayers to have cases where copies are needed. Fix the validation for clarity and correctness - was previously comparing Layers by pointer when it should have been by name (as it was comparing with a cloned graph). Change-Id: Ie282dc11913e977b8151ce1ad8bfba5e11617d40 Signed-off-by: Matthew Bentham <Matthew.Bentham@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-05-09IVGCVSW-3031 Reparent layer to new graphDerek Lamberti
Change-Id: Ic4423b8d21d794f44ddae291853e0e3b89d11bc0 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-02-11IVGCVSW-2531 Serialize a simple ArmNN NetworkMike Kelly
Change-Id: I68cf5072aca6e3a8b3b8c57e19b6d417cd5813fc Signed-off-by: Mike Kelly <mike.kelly@arm.com>
2019-02-06IVGCVSW-2606 Produce quantized InputNetwork from simple FP32 InputNetworkDerek Lamberti
Change-Id: I2140a7af5961ddf8267fbb127202de3900ea79e3 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2018-11-19IVGCVSW-2168: Remove DataLayout from LayerAron Virginas-Tar
Change-Id: Iab6ad04e5c786e4e639578f7b1d1537dd1196e2f
2018-11-02IVGCVSW-1946: Remove armnn/src from the include pathsAron Virginas-Tar
Change-Id: I663a0a0fccb43ee960ec070121a59df9db0bb04e
2018-10-22IVGCVSW-2019 : replace Compute enum in the Layer objectDavid Beck
Change-Id: I76551d511ef718eac36e5b8e5fe426ec3a402855
2018-10-10IVGCVSW-1900 : CL backend folder structureDavid Beck
* moving backends/ClWorkloads to backends/cl * and moving pure Cl workload related code to backends/cl/workloads Change-Id: I019a3c6b4da5e7a23074bf03fb057e63199ad129
2018-10-10IVGCVSW-1883 Add support for different memory layoutsDerek Lamberti
Change-Id: I6e9973bf25acad980fb4e96af8080ac829db0d28
2018-09-17IVGCVSW-1807 : change license text in file headersDavid Beck
All changes are the same: // // Copyright © 2017 ARM Ltd. All rights reserved. -// See LICENSE file in the project root for full license information. +// SPDX-License-Identifier: MIT // Change-Id: I37eae011411133663ca9d2b059714d92f8bf8e24
2018-08-31Release 18.08telsoa01
2018-05-23Release 18.05surmeh01
2018-03-29Release 18.03surmeh01