diff options
-rw-r--r-- | tests/InferenceModel.hpp | 7 | ||||
-rw-r--r-- | tests/InferenceTest.cpp | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/InferenceModel.hpp b/tests/InferenceModel.hpp index c20dd3e4b5..6b81f80cbc 100644 --- a/tests/InferenceModel.hpp +++ b/tests/InferenceModel.hpp @@ -299,6 +299,13 @@ public: armnn::Status ret = m_Runtime->EnqueueWorkload(m_NetworkIdentifier, MakeInputTensors(input), MakeOutputTensors(output)); + + // if profiling is enabled print out the results + if (profiler && profiler->IsProfilingEnabled()) + { + profiler->Print(std::cout); + } + if (ret == armnn::Status::Failure) { throw armnn::Exception("IRuntime::EnqueueWorkload failed"); diff --git a/tests/InferenceTest.cpp b/tests/InferenceTest.cpp index f9a3c68e77..8733bc53a0 100644 --- a/tests/InferenceTest.cpp +++ b/tests/InferenceTest.cpp @@ -231,6 +231,12 @@ bool InferenceTest(const InferenceTestOptions& params, BOOST_LOG_TRIVIAL(info) << std::fixed << std::setprecision(3) << "Average time per test case: " << averageTimePerTestCaseMs << " ms"; + // if profiling is enabled print out the results + if (profiler && profiler->IsProfilingEnabled()) + { + profiler->Print(std::cout); + } + if (!success) { BOOST_LOG_TRIVIAL(error) << "One or more test cases failed"; |