aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2022-07-07 14:24:59 +0100
committerNikhil Raj <nikhil.raj@arm.com>2022-07-28 15:08:22 +0100
commit83b429107a4bb1fe84e756c29d8ad3771d4beeee (patch)
treec383d2692365a8166b949f90267e152f0624704f /src/armnn
parent46f298657c14c1b0a4b0690ecce49f64dc0a7010 (diff)
downloadarmnn-83b429107a4bb1fe84e756c29d8ad3771d4beeee.tar.gz
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 <teresa.charlinreyes@arm.com> Change-Id: Ic6634d48892d11e5f146cdf285e1e333e93e9937 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/Network.cpp13
-rw-r--r--src/armnn/OptimizedNetworkImpl.hpp3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index ef9f4e7522..22fc0a3ed4 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -2949,4 +2949,17 @@ OptimizedNetworkImpl::~OptimizedNetworkImpl()
{
}
+void IOptimizedNetwork::ExecuteStrategy(IStrategy &strategy) const
+{
+ pOptimizedNetworkImpl->ExecuteStrategy(strategy);
+}
+
+void OptimizedNetworkImpl::ExecuteStrategy(IStrategy &strategy) const
+{
+ for (auto layer : GetGraph())
+ {
+ layer->ExecuteStrategy(strategy);
+ };
+}
+
} // namespace armnn
diff --git a/src/armnn/OptimizedNetworkImpl.hpp b/src/armnn/OptimizedNetworkImpl.hpp
index cb0dc4c8cf..45809d5619 100644
--- a/src/armnn/OptimizedNetworkImpl.hpp
+++ b/src/armnn/OptimizedNetworkImpl.hpp
@@ -25,8 +25,11 @@ public:
virtual size_t GetNumOutputs() const;
Graph& GetGraph() { return *m_Graph; }
+ Graph& GetGraph() const { return *m_Graph; }
ModelOptions& GetModelOptions() { return m_ModelOptions; }
+ void ExecuteStrategy(IStrategy& strategy) const;
+
private:
std::unique_ptr<Graph> m_Graph;
arm::pipe::ProfilingGuid m_Guid;