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

#include <ProgressReporter.h>

Collaboration diagram for moco::tf::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()

moco::tf::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 * moco::tf::ProgressReporter::graph ( void  ) const
inline

◆ notify() [1/4]

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

Definition at line 70 of file ProgressReporter.cpp.

71{
72 LOGGER(prime);
73
74 INFO(prime) << "--------------------------------------------------------------";
75 INFO(prime) << "Before " << logo::pass_name(info->pass());
76}
#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 moco::tf::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PassEnd > *  info)
override

Definition at line 78 of file ProgressReporter.cpp.

79{
80 LOGGER(prime);
81
82 INFO(prime) << "After " << logo::pass_name(info->pass())
83 << " (changed: " << to_char(info->changed()) << ")";
84 INFO(prime) << moco::tf::fmt(graph());
85}
FormattedGraph fmt(loco::Graph *g)
Definition LogHelper.cpp:75

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

◆ notify() [3/4]

void moco::tf::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PhaseBegin > *  info)
override

Definition at line 53 of file ProgressReporter.cpp.

54{
55 LOGGER(prime);
56
57 INFO(prime) << "==============================================================";
58 INFO(prime) << "PhaseRunner<" << to_str(strategy()) << ">";
59 INFO(prime) << "Initial graph";
60 INFO(prime) << moco::tf::fmt(graph());
61}

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

◆ notify() [4/4]

void moco::tf::ProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PhaseEnd > *  info)
override

Definition at line 63 of file ProgressReporter.cpp.

64{
65 LOGGER(prime);
66
67 INFO(prime) << "PhaseRunner<" << to_str(strategy()) << "> - done";
68}

References INFO, LOGGER, and strategy().

◆ strategy()

logo::PhaseStrategy moco::tf::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: