From b4b3ac91990eb5deaffca2300319f2ddf7aa0886 Mon Sep 17 00:00:00 2001 From: Kevin May Date: Fri, 21 May 2021 16:42:21 +0100 Subject: 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 Signed-off-by: Kevin May --- tests/ExecuteNetwork/ExecuteNetworkParams.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/ExecuteNetwork/ExecuteNetworkParams.cpp') diff --git a/tests/ExecuteNetwork/ExecuteNetworkParams.cpp b/tests/ExecuteNetwork/ExecuteNetworkParams.cpp index 944efec17f..189ece25a7 100644 --- a/tests/ExecuteNetwork/ExecuteNetworkParams.cpp +++ b/tests/ExecuteNetwork/ExecuteNetworkParams.cpp @@ -138,9 +138,11 @@ void ExecuteNetworkParams::ValidateParams() CheckModelFormat(m_ModelFormat); // Check number of simultaneous iterations - if ((m_SimultaneousIterations < 1)) + // Testing std::launch::async with a single iteration is possible if concurrent is manually set + if ((m_SimultaneousIterations <= 1 && m_ThreadPoolSize > 1) || + (m_SimultaneousIterations <= 1 && !m_Concurrent)) { - ARMNN_LOG(fatal) << "simultaneous-iterations cannot be less than 1. "; + ARMNN_LOG(fatal) << "simultaneous-iterations cannot be less than 2."; } // Check input tensor shapes -- cgit v1.2.1