aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2021-05-27 12:54:46 +0100
committerFinn Williams <Finn.Williams@arm.com>2021-05-27 12:55:29 +0100
commit25485592c6e4d1694f98a43a3f9f62d484f7f014 (patch)
treea22b77170a7d8ccac1c69620d23c42b7b2195273
parentbf99b5f05514d3a717df36c6039dcfc4a9f5b9ba (diff)
downloadarmnn-25485592c6e4d1694f98a43a3f9f62d484f7f014.tar.gz
IVGCVSW-5781 Ensure Threadpool Memhandles are created after constant layer allocations
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: If20572706d14df05e6d95ba436b364876d839495
-rw-r--r--src/armnn/LoadedNetwork.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/armnn/LoadedNetwork.cpp b/src/armnn/LoadedNetwork.cpp
index 1a94828841..71075d0396 100644
--- a/src/armnn/LoadedNetwork.cpp
+++ b/src/armnn/LoadedNetwork.cpp
@@ -168,13 +168,6 @@ LoadedNetwork::LoadedNetwork(std::unique_ptr<IOptimizedNetwork> net,
}
}
- // Create the thread pool which will have working memory handles assigned to each thread
- // Should occur after factories are registered so that the WorkingMemHandles can be created
- if (m_NetworkProperties.m_NumThreads > 0 && networkProperties.m_AsyncEnabled)
- {
- CreateThreadPool(m_NetworkProperties.m_NumThreads);
- }
-
if (!networkProperties.m_AsyncEnabled)
{
for (auto&& layer : order)
@@ -313,6 +306,13 @@ LoadedNetwork::LoadedNetwork(std::unique_ptr<IOptimizedNetwork> net,
{
AllocateAndExecuteConstantWorkloads();
}
+
+ // Create the thread pool which will have working memory handles assigned to each thread
+ // Should occur last so all factories and constant layer tensor handles are created
+ if (m_NetworkProperties.m_NumThreads > 0 && networkProperties.m_AsyncEnabled)
+ {
+ CreateThreadPool(m_NetworkProperties.m_NumThreads);
+ }
}
void LoadedNetwork::AllocateAndExecuteConstantWorkloads()