ArmNN
NotReleased
|
#include <Profiling.hpp>
Public Types | |
using | InstrumentPtr = std::unique_ptr< Instrument > |
Public Member Functions | |
Profiler () | |
~Profiler () | |
Event * | BeginEvent (const BackendId &backendId, const std::string &name, std::vector< InstrumentPtr > &&instruments) |
void | EndEvent (Event *event) |
void | EnableProfiling (bool enableProfiling) override |
bool | IsProfilingEnabled () override |
void | UpdateEventTag () |
void | AnalyzeEventsAndWriteResults (std::ostream &outStream) const override |
void | Print (std::ostream &outStream) const override |
uint32_t | GetEventColor (const BackendId &backendId) const |
template<typename ItertType > | |
void | AnalyzeEventSequenceAndWriteResults (ItertType first, ItertType last, std::ostream &outStream) const |
Friends | |
size_t | GetProfilerEventSequenceSize (armnn::Profiler *profiler) |
Additional Inherited Members | |
Protected Member Functions inherited from IProfiler | |
~IProfiler () | |
Definition at line 28 of file Profiling.hpp.
using InstrumentPtr = std::unique_ptr<Instrument> |
Definition at line 33 of file Profiling.hpp.
Profiler | ( | ) |
Definition at line 165 of file Profiling.cpp.
~Profiler | ( | ) |
Definition at line 176 of file Profiling.cpp.
References ProfilerManager::GetInstance(), Profiler::Print(), and ProfilerManager::RegisterProfiler().
|
overridevirtual |
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.
[out] | outStream | The stream where to write the profiling results to. |
Implements IProfiler.
Definition at line 380 of file Profiling.cpp.
References armnn::CalcLevel().
void AnalyzeEventSequenceAndWriteResults | ( | ItertType | first, |
ItertType | last, | ||
std::ostream & | outStream | ||
) | const |
Definition at line 114 of file Profiling.cpp.
References armnn::FindMeasurement(), BackendId::Get(), Event::GetBackendId(), armnn::GetEventPtr(), Event::GetName(), Measurement::m_Value, WallClockTimer::WALL_CLOCK_TIME, WallClockTimer::WALL_CLOCK_TIME_START, and WallClockTimer::WALL_CLOCK_TIME_STOP.
Event * BeginEvent | ( | const BackendId & | backendId, |
const std::string & | name, | ||
std::vector< InstrumentPtr > && | instruments | ||
) |
Definition at line 200 of file Profiling.cpp.
References Profiler::GetEventColor().
|
overridevirtual |
Enables/disables profiling for this profiler.
[in] | enableProfiling | A flag that indicates whether profiling should be enabled or not. |
Implements IProfiler.
Definition at line 195 of file Profiling.cpp.
void EndEvent | ( | Event * | event | ) |
Definition at line 217 of file Profiling.cpp.
References Event::GetParentEvent().
std::uint32_t GetEventColor | ( | const BackendId & | backendId | ) | const |
|
overridevirtual |
Checks whether profiling is enabled. Profiling is disabled by default.
Implements IProfiler.
Definition at line 190 of file Profiling.cpp.
|
overridevirtual |
Print stats for events in JSON Format to the given output stream.
[out] | outStream | The stream where to write the profiling results to. |
Implements IProfiler.
Definition at line 330 of file Profiling.cpp.
References armnn::ExtractJsonObjects(), JsonPrinter::PrintArmNNHeader(), JsonPrinter::PrintFooter(), JsonPrinter::PrintHeader(), JsonPrinter::PrintJsonChildObject(), and JsonPrinter::PrintNewLine().
Referenced by Profiler::~Profiler().
void UpdateEventTag | ( | ) |
|
friend |
Definition at line 22 of file ProfilerTests.cpp.