From fbd2817039db8f856d75cf9d3d3980baeaa554c9 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Thu, 7 Jul 2022 14:24:59 +0100 Subject: Revert "Revert "IVGCVSW-6650 Refactor ExecuteNetwork"" This reverts commit 1a7f033768acb27da11503bd29abb468d2e77f9e. List of fixes to be able to add this code again: * "emplacing_back" the vector inputTensors into the vector m_InputTensorsVec outside the for loop * GetIOInfo() uses IOptimizedNetwork instead of INetwork, where the infered shapes are not saved * Add missing data type Signed32 to SetupInputsAndOutputs() * PrintOutputTensors() prints the actual output without dequantizing * Add profilingDetailsMethod as input in networkProperties in ArmNNExecutor constructor * Fix typos Change-Id: I91de166f87228282db3efa27431fe91458834442 Signed-off-by: Teresa Charlin Change-Id: Ic6634d48892d11e5f146cdf285e1e333e93e9937 Signed-off-by: Francis Murtagh --- tests/InferenceModel.hpp | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'tests/InferenceModel.hpp') diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp index 93716e1a6f..268f60301c 100644 --- a/tests/InferenceModel.hpp +++ b/tests/InferenceModel.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -15,6 +15,7 @@ #include #include +#include "NetworkExecutionUtils/NetworkExecutionUtils.hpp" #include @@ -46,40 +47,6 @@ #include #include -namespace -{ - -inline bool CheckRequestedBackendsAreValid(const std::vector& backendIds, - armnn::Optional invalidBackendIds = armnn::EmptyOptional()) -{ - if (backendIds.empty()) - { - return false; - } - - armnn::BackendIdSet validBackendIds = armnn::BackendRegistryInstance().GetBackendIds(); - - bool allValid = true; - for (const auto& backendId : backendIds) - { - if (std::find(validBackendIds.begin(), validBackendIds.end(), backendId) == validBackendIds.end()) - { - allValid = false; - if (invalidBackendIds) - { - if (!invalidBackendIds.value().empty()) - { - invalidBackendIds.value() += ", "; - } - invalidBackendIds.value() += backendId; - } - } - } - return allValid; -} - -} // anonymous namespace - namespace InferenceModelInternal { using BindingPointInfo = armnn::BindingPointInfo; -- cgit v1.2.1