ArmNN
 24.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 653 of file Profiling.cpp.

653  : pProfilerImpl(new ProfilerImpl())
654 {};

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 634 of file Profiling.cpp.

635 {
636  pProfilerImpl->AnalyzeEventsAndWriteResults(outStream);
637 }

◆ 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 624 of file Profiling.cpp.

625 {
626  pProfilerImpl->EnableNetworkDetailsToStdOut(detailsMethod);
627 }

◆ 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 619 of file Profiling.cpp.

620 {
621  pProfilerImpl->EnableProfiling(enableProfiling);
622 }

◆ IsProfilingEnabled()

bool IsProfilingEnabled ( )

Checks whether profiling is enabled.

Profiling is disabled by default.

Returns
true if profiling is enabled, false otherwise.

Definition at line 629 of file Profiling.cpp.

630 {
631  return pProfilerImpl->IsProfilingEnabled();
632 }

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 639 of file Profiling.cpp.

640 {
641  pProfilerImpl->Print(outStream);
642 }

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:653
armnn::ProfilerManager::GetInstance
static ProfilerManager & GetInstance()
Definition: Profiling.cpp:602