From 83b429107a4bb1fe84e756c29d8ad3771d4beeee 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 --- include/armnn/INetwork.hpp | 4 +++- include/armnn/TypesUtils.hpp | 24 +++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 349c7e87b5..ecc888d9c1 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -801,8 +801,10 @@ public: size_t GetNumInputs() const; size_t GetNumOutputs() const; + void ExecuteStrategy(IStrategy& strategy) const; + // Creates a copy of the IOptimizedNetwork. The IOptimizedNetwork will not be reoptimized, - // the provided ModelOptions will only be used when creating a LoadedNetwork. + // the provided ModelOptions will only be used when creating a LoadedNetwork. IOptimizedNetwork(const IOptimizedNetwork& other, const ModelOptions& modelOptions); IOptimizedNetwork(std::unique_ptr graph); IOptimizedNetwork(std::unique_ptr impl); diff --git a/include/armnn/TypesUtils.hpp b/include/armnn/TypesUtils.hpp index ccb0280457..ca7e7c58ac 100644 --- a/include/armnn/TypesUtils.hpp +++ b/include/armnn/TypesUtils.hpp @@ -301,16 +301,30 @@ inline std::ostream& operator<<(std::ostream& os, Status stat) } -inline std::ostream & operator<<(std::ostream & os, const armnn::TensorShape & shape) +inline std::ostream& operator<<(std::ostream& os, const armnn::TensorShape& shape) { os << "["; - for (uint32_t i=0; i