ArmNN
 25.11
Loading...
Searching...
No Matches
IProfiler Class Reference

#include <IProfiler.hpp>

Public Member Functions

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

Referenced by ProfilingUpdateDescriptions.

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 ProfilingUpdateDescriptions.

◆ 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}

◆ GetProfilerEventSequenceSize

size_t GetProfilerEventSequenceSize ( armnn::IProfiler * profiler)
friend

◆ ProfilingUpdateDescriptions

template<typename DescriptorType>
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}

References ProfilerManager::GetInstance(), IProfiler(), and IsProfilingEnabled().

◆ ScopedProfilingEvent

friend class ScopedProfilingEvent
friend

Definition at line 66 of file IProfiler.hpp.

References ScopedProfilingEvent.

Referenced by ScopedProfilingEvent.


The documentation for this class was generated from the following files: