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

#include <ProgressReporter.h>

Collaboration diagram for luci::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
 
 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() [1/2]

luci::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 }
logo::PhaseStrategy strategy(void) const
loco::Graph * graph(void) const

◆ ProgressReporter() [2/2]

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

Definition at line 32 of file ProgressReporter.h.

33 : _graph{graph}, _strategy{strategy}
34 {
35 // DO NOTHING
36 }

Member Function Documentation

◆ graph() [1/2]

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

◆ graph() [2/2]

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

◆ notify() [1/8]

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

Definition at line 67 of file ProgressReporter.cpp.

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

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

◆ notify() [2/8]

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

◆ notify() [3/8]

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

Definition at line 75 of file ProgressReporter.cpp.

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

References luci::fmt(), graph(), info, LOGGER, logo::pass_name(), and VERBOSE.

◆ notify() [4/8]

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

◆ notify() [5/8]

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

Definition at line 50 of file ProgressReporter.cpp.

51{
52 LOGGER(l);
53
54 VERBOSE(l, 4) << "==============================================================";
55 VERBOSE(l, 4) << "luci::PhaseRunner<" << to_str(strategy()) << ">";
56 VERBOSE(l, 4) << "Initial graph";
57 VERBOSE(l, 4) << fmt(graph());
58}

References luci::fmt(), graph(), LOGGER, strategy(), and VERBOSE.

◆ notify() [6/8]

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

◆ notify() [7/8]

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

Definition at line 60 of file ProgressReporter.cpp.

61{
62 LOGGER(l);
63
64 VERBOSE(l, 4) << "luci::PhaseRunner<" << to_str(strategy()) << "> - done";
65}

References LOGGER, strategy(), and VERBOSE.

◆ notify() [8/8]

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

◆ strategy() [1/2]

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

Definition at line 44 of file ProgressReporter.h.

44{ return _strategy; }

Referenced by notify(), and notify().

◆ strategy() [2/2]

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

Definition at line 46 of file ProgressReporter.h.

46{ return _strategy; }

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