diff options
Diffstat (limited to 'tests/ExecuteNetwork/ArmNNExecutor.cpp')
-rw-r--r-- | tests/ExecuteNetwork/ArmNNExecutor.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index 7060497c83..4518f1426f 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -91,7 +91,12 @@ ArmNNExecutor::ArmNNExecutor(const ExecuteNetworkParams& params, armnn::IRuntime ArmNNExecutor::~ArmNNExecutor() { - m_Runtime->UnloadNetwork(m_NetworkId); + std::shared_ptr<armnn::IProfiler> profiler = m_Runtime->GetProfiler(m_NetworkId); + // If profiling is enabled print out the results + if (profiler && profiler->IsProfilingEnabled()) + { + profiler->Print(std::cout); + } } void ArmNNExecutor::ExecuteAsync() @@ -194,12 +199,6 @@ void ArmNNExecutor::ExecuteSync() const auto inferenceDuration = armnn::GetTimeDuration(start_time); - // If profiling is enabled print out the results - if(profiler && profiler->IsProfilingEnabled() && x == (m_Params.m_Iterations - 1)) - { - profiler->Print(std::cout); - } - if(ret == armnn::Status::Failure) { throw armnn::Exception("IRuntime::EnqueueWorkload failed"); |