diff options
author | David Monahan <David.Monahan@arm.com> | 2022-02-24 15:55:56 +0000 |
---|---|---|
committer | David Monahan <david.monahan@arm.com> | 2022-02-24 17:56:53 +0000 |
commit | 1fc448ad2455ad31b96a3891f847125a3295d75a (patch) | |
tree | 7908cd4afd294efd3191e3a38cac7e4340243d4b | |
parent | 6abc7ee0cceeb269081cc23149f4190730815e51 (diff) | |
download | armnn-1fc448ad2455ad31b96a3891f847125a3295d75a.tar.gz |
IVGCVSW-6801 Remove the call to sync after EnqueueWorkload if we didn't import
Signed-off-by: David Monahan <David.Monahan@arm.com>
Change-Id: I0c79518fb0d849809d972241ce02653259d4f8c4
-rw-r--r-- | src/armnn/Runtime.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp index 4b9d0aeabb..4998b3597e 100644 --- a/src/armnn/Runtime.cpp +++ b/src/armnn/Runtime.cpp @@ -631,15 +631,18 @@ Status RuntimeImpl::EnqueueWorkload(NetworkId networkId, auto status = loadedNetwork->EnqueueWorkload(inputTensors, outputTensors, preImportedInputIds, preImportedOutputIds); - ARMNN_LOG(info) << "Execution time: " << std::setprecision(2) - << std::fixed << armnn::GetTimeDuration(startTime).count() << " ms."; - // Call After EnqueueWorkload events - for (auto&& context : m_BackendContexts) + // Check if we imported, if not there's no need to call the After EnqueueWorkload events + if (!preImportedInputIds.empty() || !preImportedOutputIds.empty()) { - context.second->AfterEnqueueWorkload(networkId); + // Call After EnqueueWorkload events + for (auto&& context : m_BackendContexts) + { + context.second->AfterEnqueueWorkload(networkId); + } } - + ARMNN_LOG(info) << "Execution time: " << std::setprecision(2) + << std::fixed << armnn::GetTimeDuration(startTime).count() << " ms."; return status; } |