diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2024-03-26 11:18:42 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2024-04-11 17:15:37 +0000 |
commit | 571a4f723042215f52a6c0366347c5b23f48c902 (patch) | |
tree | 7dd3bc5f880bc6aef86bc5d7b54fd2e308d84dfe /src/backends/tosaReference/TosaRefBackend.cpp | |
parent | 079df4a002220722f1e580eba0d4d881b19cc337 (diff) | |
download | armnn-571a4f723042215f52a6c0366347c5b23f48c902.tar.gz |
IVGCVSW-8165: Update TOSA Common and TosaRef to use TOSA v0.80
* Keep the order of the operators in TosaRef, so that const ops go first
* Remove IsLayerSupportedTosaReferenceConstantUnsupported and open ticket in MLTOSA
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ifaa6c26dd8ad7d531f1691320d8c731956b910aa
Diffstat (limited to 'src/backends/tosaReference/TosaRefBackend.cpp')
-rw-r--r-- | src/backends/tosaReference/TosaRefBackend.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/backends/tosaReference/TosaRefBackend.cpp b/src/backends/tosaReference/TosaRefBackend.cpp index aaac07c27b..db653391e2 100644 --- a/src/backends/tosaReference/TosaRefBackend.cpp +++ b/src/backends/tosaReference/TosaRefBackend.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -92,15 +92,15 @@ OptimizationViews TosaRefBackend::OptimizeSubgraphView(const SubgraphView& subgr std::vector<TosaSerializationOperator*> operators; std::vector<TosaSerializationTensor*> tensors; - auto it = subgraph.end(); - while (it != subgraph.begin()) + auto it = subgraph.begin(); + while (it != subgraph.end()) { - --it; Layer& base = *(PolymorphicDowncast<Layer*>(*it)); if(base.GetType() == armnn::LayerType::Input || base.GetType() == armnn::LayerType::Output) { + ++it; continue; } @@ -108,10 +108,8 @@ OptimizationViews TosaRefBackend::OptimizeSubgraphView(const SubgraphView& subgr // Loop through inputs to see if there are any graph inputs, if so save them. // If it's an input to the graph "input" can be found in the string. - for (uint32_t i = 0; i < mappings->GetInputs().size(); i++) + for (const std::string& blockInputName : mappings->GetInputs()) { - std::basic_string<char> blockInputName = mappings->GetInputs()[i]; - if (blockInputName.find("input") != std::string::npos) { graphInputs.push_back(blockInputName); @@ -120,10 +118,8 @@ OptimizationViews TosaRefBackend::OptimizeSubgraphView(const SubgraphView& subgr // Loop through outputs to see if there are any graph outputs, if so save them. // If it's an output to the graph "output" can be found in the string. - for (uint32_t i = 0; i < mappings->GetOutputs().size(); i++) + for (const std::string& blockOutputName : mappings->GetOutputs()) { - std::basic_string<char> blockOutputName = mappings->GetOutputs()[i]; - if (blockOutputName.find("output") != std::string::npos) { graphOutputs.push_back(blockOutputName); @@ -135,6 +131,8 @@ OptimizationViews TosaRefBackend::OptimizeSubgraphView(const SubgraphView& subgr auto blockTensors = mappings->GetTensors(); tensors.insert(tensors.end(), blockTensors.begin(), blockTensors.end()); + + ++it; } // Add all mappings to main block. |