From f487486c843a38fced90229923433d09f99fc2e5 Mon Sep 17 00:00:00 2001 From: Keith Davis Date: Mon, 9 Aug 2021 16:49:18 +0100 Subject: IVGCVSW-6292 Allow profiling details to be switched off during profiling * Add switch for network details during profiling Signed-off-by: Keith Davis Change-Id: I8bd49fd58f0e0255598106e9ab36806ee78391d6 --- src/armnn/Profiling.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/armnn/Profiling.cpp') diff --git a/src/armnn/Profiling.cpp b/src/armnn/Profiling.cpp index 509e9dec08..b9afc8665a 100644 --- a/src/armnn/Profiling.cpp +++ b/src/armnn/Profiling.cpp @@ -196,6 +196,11 @@ void ProfilerImpl::EnableProfiling(bool enableProfiling) m_ProfilingEnabled = enableProfiling; } +void ProfilerImpl::EnableNetworkDetailsToStdOut() +{ + m_EnableDetailsToStdOut = true; +} + Event* ProfilerImpl::BeginEvent(armnn::IProfiler* profiler, const BackendId& backendId, const std::string& label, @@ -378,7 +383,7 @@ void ProfilerImpl::Print(std::ostream& outStream) const printer.PrintHeader(); printer.PrintArmNNHeader(); - if (m_ProfilingDetails.get()->DetailsExist()) + if (m_ProfilingDetails.get()->DetailsExist() && m_EnableDetailsToStdOut) { JsonChildObject detailsObject{ "layer_details" }; ConfigureDetailsObject(detailsObject, m_ProfilingDetails.get()->GetProfilingDetails()); @@ -539,6 +544,11 @@ void IProfiler::EnableProfiling(bool enableProfiling) pProfilerImpl->EnableProfiling(enableProfiling); } +void IProfiler::EnableNetworkDetailsToStdOut() +{ + pProfilerImpl->EnableNetworkDetailsToStdOut(); +} + bool IProfiler::IsProfilingEnabled() { return pProfilerImpl->IsProfilingEnabled(); -- cgit v1.2.1