aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNikhil Raj <nikhil.raj@arm.com>2024-04-02 14:35:34 +0100
committerNikhil Raj <nikhil.raj@arm.com>2024-04-09 16:30:29 +0100
commit02d4046a0fa6c3a335adf1fc305c1b6a96a0907e (patch)
tree80c6c8694b82f01020bee586d47d0b75a092d19c /tests
parentc6953e5b337fec9524b5492fbb197937de4e1224 (diff)
downloadarmnn-02d4046a0fa6c3a335adf1fc305c1b6a96a0907e.tar.gz
IVGCVSW-8298 Fix failing fsrcnn test
Change-Id: I03c26ab763ec306a6efe31f9b4e0b1c058589bf7 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ExecuteNetwork/ArmNNExecutor.cpp13
-rw-r--r--tests/ExecuteNetwork/ExecuteNetwork.cpp7
2 files changed, 12 insertions, 8 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");
diff --git a/tests/ExecuteNetwork/ExecuteNetwork.cpp b/tests/ExecuteNetwork/ExecuteNetwork.cpp
index 9f81eb1168..8727fc6dc2 100644
--- a/tests/ExecuteNetwork/ExecuteNetwork.cpp
+++ b/tests/ExecuteNetwork/ExecuteNetwork.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -93,6 +93,11 @@ int main(int argc, const char* argv[])
}
comparisonExecutor->PrintNetworkInfo();
+
+ if (programOptions.m_ExNetParams.m_OutputDetailsOnlyToStdOut)
+ {
+ return EXIT_SUCCESS;
+ }
comparisonExecutor->Execute();
comparisonExecutor->CompareAndPrintResult(outputResults);