ArmNN
 23.08
IProfiler Class Reference

#include <IProfiler.hpp>

Public Member Functions

void EnableProfiling (bool enableProfiling)
 Enables/disables profiling for this profiler. More...
 
bool IsProfilingEnabled ()
 Checks whether profiling is enabled. More...
 
void AnalyzeEventsAndWriteResults (std::ostream &outStream) const
 Analyzes the tracked events and writes the results to the given output stream. More...
 
void Print (std::ostream &outStream) const
 Print stats for events in JSON Format to the given output stream. More...
 
void EnableNetworkDetailsToStdOut (ProfilingDetailsMethod detailsMethod)
 Print out details of each layer within the network that possesses a descriptor. More...
 
 ~IProfiler ()
 
 IProfiler ()
 

Friends

class ScopedProfilingEvent
 
template<typename DescriptorType >
void ProfilingUpdateDescriptions (const std::string &name, const DescriptorType &desc, const WorkloadInfo &infos, const arm::pipe::ProfilingGuid guid)
 
size_t GetProfilerEventSequenceSize (armnn::IProfiler *profiler)
 

Detailed Description

Definition at line 21 of file IProfiler.hpp.

Constructor & Destructor Documentation

◆ ~IProfiler()

~IProfiler ( )
default

◆ IProfiler()

IProfiler ( )

Definition at line 644 of file Profiling.cpp.

644  : pProfilerImpl(new ProfilerImpl())
645 {};

Member Function Documentation

◆ AnalyzeEventsAndWriteResults()

void AnalyzeEventsAndWriteResults ( std::ostream &  outStream) const

Analyzes the tracked events and writes the results to the given output stream.

Please refer to the configuration variables in Profiling.cpp to customize the information written.

Parameters
[out]outStreamThe stream where to write the profiling results to.

Definition at line 625 of file Profiling.cpp.

626 {
627  pProfilerImpl->AnalyzeEventsAndWriteResults(outStream);
628 }

◆ EnableNetworkDetailsToStdOut()

void EnableNetworkDetailsToStdOut ( ProfilingDetailsMethod  detailsMethod)

Print out details of each layer within the network that possesses a descriptor.

Also outputs tensor info. This will be part of the profiling json output

Definition at line 615 of file Profiling.cpp.

616 {
617  pProfilerImpl->EnableNetworkDetailsToStdOut(detailsMethod);
618 }

◆ EnableProfiling()

void EnableProfiling ( bool  enableProfiling)

Enables/disables profiling for this profiler.

Parameters
[in]enableProfilingA flag that indicates whether profiling should be enabled or not.

Definition at line 610 of file Profiling.cpp.

611 {
612  pProfilerImpl->EnableProfiling(enableProfiling);
613 }

◆ IsProfilingEnabled()

bool IsProfilingEnabled ( )

Checks whether profiling is enabled.

Profiling is disabled by default.

Returns
true if profiling is enabled, false otherwise.

Definition at line 620 of file Profiling.cpp.

621 {
622  return pProfilerImpl->IsProfilingEnabled();
623 }

Referenced by armnn::ProfilingUpdateDescriptions(), and ScopedProfilingEvent::ScopedProfilingEvent().

◆ Print()

void Print ( std::ostream &  outStream) const

Print stats for events in JSON Format to the given output stream.

Parameters
[out]outStreamThe stream where to write the profiling results to.

Definition at line 630 of file Profiling.cpp.

631 {
632  pProfilerImpl->Print(outStream);
633 }

Referenced by armnn_driver::DumpJsonProfilingIfRequired().

Friends And Related Function Documentation

◆ GetProfilerEventSequenceSize

size_t GetProfilerEventSequenceSize ( armnn::IProfiler profiler)
friend

◆ ProfilingUpdateDescriptions

void ProfilingUpdateDescriptions ( const std::string &  name,
const DescriptorType &  desc,
const WorkloadInfo infos,
const arm::pipe::ProfilingGuid  guid 
)
friend

< Profiler used

Definition at line 180 of file Profiling.hpp.

184 {
185  IProfiler* profiler(ProfilerManager::GetInstance().GetProfiler()); ///< Profiler used
186  if (profiler && profiler->IsProfilingEnabled())
187  {
188  profiler->AddLayerDetails(name, desc, infos, guid);
189  }
190 }

◆ ScopedProfilingEvent

friend class ScopedProfilingEvent
friend

Definition at line 66 of file IProfiler.hpp.


The documentation for this class was generated from the following files:
armnn::IProfiler::IProfiler
IProfiler()
Definition: Profiling.cpp:644
armnn::ProfilerManager::GetInstance
static ProfilerManager & GetInstance()
Definition: Profiling.cpp:593