aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/Profiling.cpp
diff options
context:
space:
mode:
authorKeith Davis <keith.davis@arm.com>2021-08-09 16:49:18 +0100
committerMatthew Sloyan <matthew.sloyan@arm.com>2021-08-10 14:07:27 +0000
commitf487486c843a38fced90229923433d09f99fc2e5 (patch)
tree63a2268196279a5c97c3b9dea86024f0bf4a751e /src/armnn/Profiling.cpp
parentbcd860a30eba22bb2ba0943ad705734ce0ec5b23 (diff)
downloadarmnn-f487486c843a38fced90229923433d09f99fc2e5.tar.gz
IVGCVSW-6292 Allow profiling details to be switched off during profiling
* Add switch for network details during profiling Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I8bd49fd58f0e0255598106e9ab36806ee78391d6
Diffstat (limited to 'src/armnn/Profiling.cpp')
-rw-r--r--src/armnn/Profiling.cpp12
1 files changed, 11 insertions, 1 deletions
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();