aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/LoadedNetwork.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn/LoadedNetwork.cpp')
-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()