aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Monahan <David.Monahan@arm.com>2022-02-24 15:55:56 +0000
committerColm Donelan <colm.donelan@arm.com>2022-02-25 10:09:10 +0000
commitb254731ff27a40f382695d5753e1b537c4736bfa (patch)
treecb504a2504a03a15e097583005ca54386f12ba05
parentf4809b5f8c166b8b89ced34a9809fc7f4d4b70bf (diff)
downloadarmnn-branches/armnn_22_02.tar.gz
IVGCVSW-6801 Remove the call to sync after EnqueueWorkload if we didn't importv22.02branches/armnn_22_02
Signed-off-by: David Monahan <David.Monahan@arm.com> Change-Id: I0c79518fb0d849809d972241ce02653259d4f8c4
-rw-r--r--src/armnn/Runtime.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/armnn/Runtime.cpp b/src/armnn/Runtime.cpp
index 1abe0f394b..a91368140c 100644
--- a/src/armnn/Runtime.cpp
+++ b/src/armnn/Runtime.cpp
@@ -630,15 +630,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;
}