diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2022-11-25 16:10:00 +0000 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2022-12-08 12:57:47 +0000 |
commit | c5fe6e71cd39096af7c2523ec2afe96008c51b0c (patch) | |
tree | 1486349bc36e17c1577465aab81d9eb3ca64e861 /src/backends/tosaCommon/TosaMappings.hpp | |
parent | 3106c7f1714aea556d06d9f1e8c7faaeaeca996d (diff) | |
download | armnn-c5fe6e71cd39096af7c2523ec2afe96008c51b0c.tar.gz |
IVGCVSW-7168 Add Conv2d and Constant support to TOSA Reference Backend
* Added TOSA Conv2d and Constant mappings.
* Added unique naming to mappings based on previous and following
layers, so they are connected correctly.
* Updated existing mappings with new naming convention.
* Added all mappings to one main block in OptimizeSubgraphView.
* Removed isMain from mapping functions.
* Added Conv2d EndToEnd test.
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I27c3e238407c32379ce25a1f01dad11523ef5d2b
Diffstat (limited to 'src/backends/tosaCommon/TosaMappings.hpp')
-rw-r--r-- | src/backends/tosaCommon/TosaMappings.hpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/backends/tosaCommon/TosaMappings.hpp b/src/backends/tosaCommon/TosaMappings.hpp index 8df2493d6e..cc41f1b7c8 100644 --- a/src/backends/tosaCommon/TosaMappings.hpp +++ b/src/backends/tosaCommon/TosaMappings.hpp @@ -13,22 +13,18 @@ using namespace armnn; using namespace tosa; -// From the input armnn::Layer, set the corresponding data field in the -// tosa::TosaSerializationTensor where constant tensor data exists in the armnn::Layer. -void SetBasicBlockConstantTensorData(Layer* layer, TosaSerializationBasicBlock* /*basicBlock*/); - // Populates a tosa::TosaSerializationBasicBlock from constructing // tosa::TosaSerializationOperator(s) and tosa::TosaSerializationTensor(s) // based on the input armnn::LayerType and associated armnn::TensorInfos and armnn::Descriptor. // -// If an armnn::LayerType does not have a tosa mapping or the mapping is not implemented in ArmNN, +// If an armnn::LayerType does not have a TOSA mapping or the mapping is not implemented in ArmNN, // an empty tosa::TosaSerializationBasicBlock() is returned with operator tosa::Op_UNKNOWN. -TosaSerializationBasicBlock* GetTosaMapping(const LayerType type, +TosaSerializationBasicBlock* GetTosaMapping(const Layer* layer, + const LayerType type, const std::vector<const TensorInfo*>& inputs, const std::vector<const TensorInfo*>& outputs, - const BaseDescriptor& /*descriptor*/, - bool isMain); + const BaseDescriptor& /*descriptor*/); // Function called in armnn::OptimizeSubgraphView() when access to armnn::Layer is available -// and there is an option to set tosa basic block data from constant layer tenors available from the input layer. -TosaSerializationBasicBlock* GetTosaMappingFromLayer(Layer* layer, bool isMain); +// and there is an option to set TOSA basic block data from constant layer tensors available from the input layer. +TosaSerializationBasicBlock* GetTosaMappingFromLayer(Layer* layer); |