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

#include <ProgressReporter.h>

Collaboration diagram for fme_apply::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 29 of file ProgressReporter.h.

Constructor & Destructor Documentation

◆ ProgressReporter()

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

Member Function Documentation

◆ graph()

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

◆ notify() [1/4]

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

Definition at line 65 of file ProgressReporter.cpp.

66{
67 LOGGER(prime);
68
69 INFO(prime) << "--------------------------------------------------------------";
70 INFO(prime) << "Before " << logo::pass_name(info->pass());
71}
#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 fme_apply::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PassEnd > *  info)
override

Definition at line 73 of file ProgressReporter.cpp.

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

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

◆ notify() [3/4]

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

Definition at line 48 of file ProgressReporter.cpp.

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

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

◆ notify() [4/4]

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

Definition at line 58 of file ProgressReporter.cpp.

59{
60 LOGGER(prime);
61
62 INFO(prime) << "PhaseRunner<" << to_str(strategy()) << "> - done";
63}

References INFO, LOGGER, and strategy().

◆ strategy()

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

Definition at line 46 of file ProgressReporter.h.

46{ return _strategy; }

Referenced by notify(), and notify().


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