aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/LoadedNetwork.cpp
diff options
context:
space:
mode:
authorKevin May <kevin.may@arm.com>2021-05-26 16:01:08 +0100
committerKevin May <kevin.may@arm.com>2021-05-26 16:19:38 +0100
commit94dd4dbbb2b59f47e38cf2f1280c4b25be45ea64 (patch)
treeb179186bcac41484dad37bcee18a705a05e462f6 /src/armnn/LoadedNetwork.cpp
parentb4b3ac91990eb5deaffca2300319f2ddf7aa0886 (diff)
downloadarmnn-94dd4dbbb2b59f47e38cf2f1280c4b25be45ea64.tar.gz
IVGCVSW-6009 Enable creating thread pool with 1 thread
* Allow the user to use create a tread pool with a single thread * This is in keeping with how the android-nn-driver was implemented * Add it to ExecuteNetwork thread pool creation Signed-off-by: Kevin May <kevin.may@arm.com> Change-Id: I05b8048a9e0e45ae11d2b585080af28d9d008d81
Diffstat (limited to 'src/armnn/LoadedNetwork.cpp')
-rw-r--r--src/armnn/LoadedNetwork.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/armnn/LoadedNetwork.cpp b/src/armnn/LoadedNetwork.cpp
index 25f8ddf6e5..1a94828841 100644
--- a/src/armnn/LoadedNetwork.cpp
+++ b/src/armnn/LoadedNetwork.cpp
@@ -170,7 +170,7 @@ 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 > 1 && networkProperties.m_AsyncEnabled)
+ if (m_NetworkProperties.m_NumThreads > 0 && networkProperties.m_AsyncEnabled)
{
CreateThreadPool(m_NetworkProperties.m_NumThreads);
}