|
25.11
|
#include <Profiling.hpp>
Classes | |
| struct | Marker |
| struct | ProfilingEventStats |
Public Types | |
| using | InstrumentPtr = std::unique_ptr<Instrument> |
| using | EventPtr = std::unique_ptr<Event> |
| using | DescPtr = std::unique_ptr<ProfilingDetails> |
Public Member Functions | |
| ProfilerImpl () | |
| ~ProfilerImpl () | |
| Event * | BeginEvent (armnn::IProfiler *profiler, const BackendId &backendId, const std::string &name, std::vector< InstrumentPtr > &&instruments, const Optional< arm::pipe::ProfilingGuid > &guid) |
| template<typename DescriptorType> | |
| void | AddLayerDetails (const std::string &label, const DescriptorType &desc, const WorkloadInfo &infos, const arm::pipe::ProfilingGuid guid) |
| void | EndEvent (Event *event) |
| void | EnableProfiling (bool enableProfiling) |
| bool | IsProfilingEnabled () |
| void | EnableNetworkDetailsToStdOut (ProfilingDetailsMethod detailsMethod) |
| void | UpdateEventTag () |
| void | AnalyzeEventsAndWriteResults (std::ostream &outStream) const |
| void | Print (std::ostream &outStream) const |
| uint32_t | GetEventColor (const BackendId &backendId) const |
| template<typename EventIterType> | |
| void | AnalyzeEventSequenceAndWriteResults (EventIterType first, EventIterType last, std::ostream &outStream) const |
| std::map< std::string, ProfilingEventStats > | CalculateProfilingEventStats () const |
| void | PopulateParent (std::vector< const Event * > &outEvents, int &outBaseLevel, std::string parentName) const |
| void | PopulateDescendants (std::map< const Event *, std::vector< const Event * > > &outDescendantsMap) const |
| template<typename ItertType> | |
| void | AnalyzeEventSequenceAndWriteResults (ItertType first, ItertType last, std::ostream &outStream) const |
Public Attributes | |
| std::stack< Event * > | m_Parents |
| std::vector< EventPtr > | m_EventSequence |
| DescPtr | m_ProfilingDetails = std::make_unique<ProfilingDetails>() |
| bool | m_ProfilingEnabled |
| ProfilingDetailsMethod | m_DetailsToStdOutMethod |
Definition at line 29 of file Profiling.hpp.
| using DescPtr = std::unique_ptr<ProfilingDetails> |
Definition at line 79 of file Profiling.hpp.
Definition at line 78 of file Profiling.hpp.
| using InstrumentPtr = std::unique_ptr<Instrument> |
Definition at line 34 of file Profiling.hpp.
| ProfilerImpl | ( | ) |
Definition at line 164 of file Profiling.cpp.
References armnn::g_ProfilingEventCountHint, m_DetailsToStdOutMethod, m_EventSequence, m_ProfilingEnabled, and armnn::Undefined.
| ~ProfilerImpl | ( | ) |
Definition at line 176 of file Profiling.cpp.
References armnn::g_WriteReportToStdOutOnProfilerDestruction, ProfilerManager::GetInstance(), m_ProfilingEnabled, Print(), and ProfilerManager::RegisterProfiler().
|
inline |
Definition at line 45 of file Profiling.hpp.
References m_ProfilingDetails.
| void AnalyzeEventsAndWriteResults | ( | std::ostream & | outStream | ) | const |
Definition at line 490 of file Profiling.cpp.
References AnalyzeEventSequenceAndWriteResults(), armnn::CalcLevel(), armnn::g_AggregateProfilingEventsByInference, m_EventSequence, m_Parents, PopulateDescendants(), and PopulateParent().
| void AnalyzeEventSequenceAndWriteResults | ( | EventIterType | first, |
| EventIterType | last, | ||
| std::ostream & | outStream ) const |
Referenced by AnalyzeEventsAndWriteResults().
| void AnalyzeEventSequenceAndWriteResults | ( | ItertType | first, |
| ItertType | last, | ||
| std::ostream & | outStream ) const |
Definition at line 113 of file Profiling.cpp.
References CalculateProfilingEventStats(), armnn::FindMeasurement(), armnn::g_WriteProfilingEventSequence, BackendId::Get(), Event::GetBackendId(), armnn::GetEventPtr(), Event::GetName(), ProfilerImpl::ProfilingEventStats::m_Count, ProfilerImpl::ProfilingEventStats::m_MaxMs, ProfilerImpl::ProfilingEventStats::m_MinMs, ProfilerImpl::ProfilingEventStats::m_TotalMs, Measurement::m_Value, WallClockTimer::WALL_CLOCK_TIME, WallClockTimer::WALL_CLOCK_TIME_START, and WallClockTimer::WALL_CLOCK_TIME_STOP.
| Event * BeginEvent | ( | armnn::IProfiler * | profiler, |
| const BackendId & | backendId, | ||
| const std::string & | name, | ||
| std::vector< InstrumentPtr > && | instruments, | ||
| const Optional< arm::pipe::ProfilingGuid > & | guid ) |
Definition at line 205 of file Profiling.cpp.
References GetEventColor(), m_EventSequence, and m_Parents.
| std::map< std::string, ProfilerImpl::ProfilingEventStats > CalculateProfilingEventStats | ( | ) | const |
Definition at line 82 of file Profiling.cpp.
References armnn::FindMeasurement(), ProfilerImpl::ProfilingEventStats::m_Count, m_EventSequence, ProfilerImpl::ProfilingEventStats::m_MaxMs, ProfilerImpl::ProfilingEventStats::m_MinMs, ProfilerImpl::ProfilingEventStats::m_TotalMs, Measurement::m_Value, and WallClockTimer::WALL_CLOCK_TIME.
Referenced by AnalyzeEventSequenceAndWriteResults().
| void EnableNetworkDetailsToStdOut | ( | ProfilingDetailsMethod | detailsMethod | ) |
Definition at line 200 of file Profiling.cpp.
References m_DetailsToStdOutMethod.
| void EnableProfiling | ( | bool | enableProfiling | ) |
Definition at line 195 of file Profiling.cpp.
References m_ProfilingEnabled.
| void EndEvent | ( | Event * | event | ) |
Definition at line 229 of file Profiling.cpp.
References Event::GetParentEvent(), and m_Parents.
| std::uint32_t GetEventColor | ( | const BackendId & | backendId | ) | const |
Definition at line 572 of file Profiling.cpp.
Referenced by BeginEvent().
| bool IsProfilingEnabled | ( | ) |
Definition at line 190 of file Profiling.cpp.
References m_ProfilingEnabled.
| void PopulateDescendants | ( | std::map< const Event *, std::vector< const Event * > > & | outDescendantsMap | ) | const |
Definition at line 282 of file Profiling.cpp.
References Event::GetParentEvent(), and m_EventSequence.
Referenced by AnalyzeEventsAndWriteResults(), and Print().
| void PopulateParent | ( | std::vector< const Event * > & | outEvents, |
| int & | outBaseLevel, | ||
| std::string | parentName ) const |
Definition at line 268 of file Profiling.cpp.
References armnn::CalcLevel(), Event::GetName(), and m_EventSequence.
Referenced by AnalyzeEventsAndWriteResults(), and Print().
| void Print | ( | std::ostream & | outStream | ) | const |
Definition at line 395 of file Profiling.cpp.
References armnn::DetailsOnly, armnn::DetailsWithEvents, JsonChildObject::EnableDetailsOnly(), armnn::ExecObjectDesc, armnn::ExtractJsonObjects(), m_DetailsToStdOutMethod, m_ProfilingDetails, PopulateDescendants(), PopulateParent(), JsonUtils::PrintArmNNHeader(), JsonUtils::PrintFooter(), JsonUtils::PrintHeader(), JsonPrinter::PrintJsonChildObject(), JsonUtils::PrintNewLine(), JsonUtils::PrintSeparator(), JsonChildObject::SetAndParseDetails(), and JsonChildObject::SetType().
Referenced by ~ProfilerImpl().
| void UpdateEventTag | ( | ) |
| ProfilingDetailsMethod m_DetailsToStdOutMethod |
Definition at line 105 of file Profiling.hpp.
Referenced by EnableNetworkDetailsToStdOut(), Print(), and ProfilerImpl().
| std::vector<EventPtr> m_EventSequence |
Definition at line 102 of file Profiling.hpp.
Referenced by AnalyzeEventsAndWriteResults(), BeginEvent(), CalculateProfilingEventStats(), PopulateDescendants(), PopulateParent(), and ProfilerImpl().
| std::stack<Event*> m_Parents |
Definition at line 101 of file Profiling.hpp.
Referenced by AnalyzeEventsAndWriteResults(), BeginEvent(), and EndEvent().
| DescPtr m_ProfilingDetails = std::make_unique<ProfilingDetails>() |
Definition at line 103 of file Profiling.hpp.
Referenced by AddLayerDetails(), and Print().
| bool m_ProfilingEnabled |
Definition at line 104 of file Profiling.hpp.
Referenced by EnableProfiling(), IsProfilingEnabled(), ProfilerImpl(), and ~ProfilerImpl().