diff options
author | Kevin May <kevin.may@arm.com> | 2021-05-21 16:42:21 +0100 |
---|---|---|
committer | Kevin May <kevin.may@arm.com> | 2021-05-26 11:56:54 +0000 |
commit | b4b3ac91990eb5deaffca2300319f2ddf7aa0886 (patch) | |
tree | e480826fe604d652877459ce4bbf4314a461e4b2 /src/armnn/LoadedNetwork.cpp | |
parent | 401c1c3f973da1a2e2cef7f88a5aac2cf295fac7 (diff) | |
download | armnn-b4b3ac91990eb5deaffca2300319f2ddf7aa0886.tar.gz |
IVGCVSW-6009 Integrate threadpool into ExNet
* Remove concurrent flag from ExecuteNetwork as it is possible
to deduce if SimultaneousIterations > 1
* Add void RunAsync()
* Refactor some unit tests
Change-Id: I7021d4821b0e460470908294cbd9462850e8b361
Signed-off-by: Keith Davis <keith.davis@arm.com>
Signed-off-by: Kevin May <kevin.may@arm.com>
Diffstat (limited to 'src/armnn/LoadedNetwork.cpp')
-rw-r--r-- | src/armnn/LoadedNetwork.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/armnn/LoadedNetwork.cpp b/src/armnn/LoadedNetwork.cpp index 53a9e18863..25f8ddf6e5 100644 --- a/src/armnn/LoadedNetwork.cpp +++ b/src/armnn/LoadedNetwork.cpp @@ -169,17 +169,17 @@ 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 thet the WorkingMemHandles can be created - if (m_NetworkProperties.m_NumThreads > 0 && networkProperties.m_AsyncEnabled) + // Should occur after factories are registered so that the WorkingMemHandles can be created + if (m_NetworkProperties.m_NumThreads > 1 && networkProperties.m_AsyncEnabled) { CreateThreadPool(m_NetworkProperties.m_NumThreads); } if (!networkProperties.m_AsyncEnabled) { - for (auto &&layer : order) + for (auto&& layer : order) { - auto &workloadFactory = GetWorkloadFactory(*layer); + auto& workloadFactory = GetWorkloadFactory(*layer); switch (layer->GetType()) { |