ONE - On-device Neural Engine
Loading...
Searching...
No Matches
exo::ProgressReporter Class Reference

#include <ProgressReporter.h>

Collaboration diagram for exo::ProgressReporter:

Public Member Functions

 ProgressReporter (loco::Graph *graph, logo::PhaseStrategy strategy)
 
void notify (const logo::PhaseEventInfo< logo::PhaseEvent::PhaseBegin > *) override
 
void notify (const logo::PhaseEventInfo< logo::PhaseEvent::PhaseEnd > *) override
 
void notify (const logo::PhaseEventInfo< logo::PhaseEvent::PassBegin > *) override
 
void notify (const logo::PhaseEventInfo< logo::PhaseEvent::PassEnd > *) override
 
loco::Graphgraph (void) const
 
logo::PhaseStrategy strategy (void) const
 
- Public Member Functions inherited from logo::PhaseEventListener
virtual ~PhaseEventListener ()=default
 
virtual void notify (const PhaseEventInfo< PhaseEvent::PhaseBegin > *)
 
virtual void notify (const PhaseEventInfo< PhaseEvent::PhaseEnd > *)
 
virtual void notify (const PhaseEventInfo< PhaseEvent::PassBegin > *)
 
virtual void notify (const PhaseEventInfo< PhaseEvent::PassEnd > *)
 

Detailed Description

Definition at line 27 of file ProgressReporter.h.

Constructor & Destructor Documentation

◆ ProgressReporter()

exo::ProgressReporter::ProgressReporter ( loco::Graph graph,
logo::PhaseStrategy  strategy 
)
inline

Definition at line 30 of file ProgressReporter.h.

31 : _graph{graph}, _strategy{strategy}
32 {
33 // DO NOTHING
34 }
loco::Graph * graph(void) const
logo::PhaseStrategy strategy(void) const

Member Function Documentation

◆ graph()

loco::Graph * exo::ProgressReporter::graph ( void  ) const
inline

◆ notify() [1/4]

void exo::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PassBegin > *  info)
override

Definition at line 67 of file ProgressReporter.cpp.

68{
69 LOGGER(prime);
70
71 INFO(prime) << "--------------------------------------------------------------";
72 INFO(prime) << "Before " << logo::pass_name(info->pass());
73}
#define LOGGER(name)
Definition Log.h:65
#define INFO(name)
Definition Log.h:68
volatile const char info[]
std::string pass_name(const Pass *)
Definition Pass.cpp:22

References INFO, info, LOGGER, and logo::pass_name().

◆ notify() [2/4]

void exo::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PassEnd > *  info)
override

Definition at line 75 of file ProgressReporter.cpp.

76{
77 LOGGER(prime);
78
79 INFO(prime) << "After " << logo::pass_name(info->pass())
80 << " (changed: " << to_char(info->changed()) << ")";
81 INFO(prime) << fmt(graph());
82}
FormattedGraph fmt(loco::Graph *g)
Definition LogHelper.cpp:73

References exo::fmt(), graph(), INFO, info, LOGGER, and logo::pass_name().

◆ notify() [3/4]

void exo::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PhaseBegin > *  )
override

Definition at line 50 of file ProgressReporter.cpp.

51{
52 LOGGER(prime);
53
54 INFO(prime) << "==============================================================";
55 INFO(prime) << "exo::PhaseRunner<" << to_str(strategy()) << ">";
56 INFO(prime) << "Initial graph";
57 INFO(prime) << fmt(graph());
58}

References exo::fmt(), graph(), INFO, LOGGER, and strategy().

◆ notify() [4/4]

void exo::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PhaseEnd > *  )
override

Definition at line 60 of file ProgressReporter.cpp.

61{
62 LOGGER(prime);
63
64 INFO(prime) << "exo::PhaseRunner<" << to_str(strategy()) << "> - done";
65}

References INFO, LOGGER, and strategy().

◆ strategy()

logo::PhaseStrategy exo::ProgressReporter::strategy ( void  ) const
inline

Definition at line 44 of file ProgressReporter.h.

44{ return _strategy; }

Referenced by notify(), and notify().


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