diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2022-12-08 13:38:23 +0000 |
---|---|---|
committer | Cathal Corbett <cathal.corbett@arm.com> | 2022-12-15 10:00:12 +0000 |
commit | fc9d5e7d1e0c1a4d7fed4ebc363832e03c3e2543 (patch) | |
tree | 5c1b7efd146256c2de9781ae5a60e22cf2d6142a /src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp | |
parent | 67fd526f8f7c79803d514a6045454049104eced9 (diff) | |
download | armnn-fc9d5e7d1e0c1a4d7fed4ebc363832e03c3e2543.tar.gz |
IVGCVSW-7204 Add TransposeConv2d support to TOSA Reference Backend
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: I9bfd597afd41468f304edfbe5d7141378ce60d4f
Diffstat (limited to 'src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp')
-rw-r--r-- | src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp b/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp index 288966badd..be2f53e413 100644 --- a/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp +++ b/src/backends/tosaCommon/operatorMappings/TosaOperatorUtils.hpp @@ -75,6 +75,23 @@ inline std::string GenerateUniqueName(const Layer& layer, uint32_t layerSlot) } } +// Function that generates unique output name using the layer type, input slot and layer guid. +inline std::string GenerateUniqueOutputName(const Layer& layer, uint32_t layerSlot) +{ + Layer& connectedLayer = layer.GetOutputSlot().GetConnection(0)->GetOwningLayer(); + + // Get the layer connected to the output slot, if output use that layer and id, + // otherwise use current layer and id. + if(connectedLayer.GetType() == LayerType::Output) + { + return GenerateUniqueName(connectedLayer, layerSlot); + } + else + { + return GenerateUniqueName(layer, layerSlot); + } +} + // Function to return unique int as a string to ensure uniqueness between all input, output and block names. static int uniqueTosaMappingID = 0; inline std::string GetUniqueTosaMappingID() |