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

#include <ProgressReporter.h>

Collaboration diagram for luci::ModuleProgressReporter:

Public Member Functions

 ModuleProgressReporter (luci::Module *module, 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
 
luci::Modulemodule (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 53 of file ProgressReporter.h.

Constructor & Destructor Documentation

◆ ModuleProgressReporter()

luci::ModuleProgressReporter::ModuleProgressReporter ( luci::Module module,
logo::PhaseStrategy  strategy 
)
inline

Definition at line 56 of file ProgressReporter.h.

57 : _module{module}, _strategy{strategy}
58 {
59 // DO NOTHING
60 }

Member Function Documentation

◆ module()

luci::Module * luci::ModuleProgressReporter::module ( void  ) const
inline

Definition at line 69 of file ProgressReporter.h.

69{ return _module; }

Referenced by notify(), and notify().

◆ notify() [1/4]

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

Definition at line 105 of file ProgressReporter.cpp.

106{
107 LOGGER(prime);
108
109 INFO(prime) << "--------------------------------------------------------------";
110 INFO(prime) << "Before " << logo::pass_name(info->pass());
111}
#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 luci::ModuleProgressReporter::notify ( const logo::PhaseEventInfo< logo::PhaseEvent::PassEnd > *  info)
override

Definition at line 113 of file ProgressReporter.cpp.

114{
115 LOGGER(prime);
116
117 INFO(prime) << "After " << logo::pass_name(info->pass())
118 << " (changed: " << to_char(info->changed()) << ")";
119 for (size_t g = 0; g < module()->size(); ++g)
120 {
121 INFO(prime) << "graphs #" << g;
122 INFO(prime) << luci::fmt(module()->graph(g));
123 }
124}
size_t size(void) const
Definition Module.h:44
luci::Module * module(void) const
FormattedGraph fmt(loco::Graph *g)
Definition LogHelper.cpp:23

References luci::fmt(), INFO, info, LOGGER, module(), logo::pass_name(), and luci::Module::size().

◆ notify() [3/4]

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

Definition at line 84 of file ProgressReporter.cpp.

85{
86 LOGGER(prime);
87
88 INFO(prime) << "==============================================================";
89 INFO(prime) << "ModulePhaseRunner<" << to_str(strategy()) << ">";
90 INFO(prime) << "Initial graphs";
91 for (size_t g = 0; g < module()->size(); ++g)
92 {
93 INFO(prime) << "graphs #" << g;
94 INFO(prime) << luci::fmt(module()->graph(g));
95 }
96}
logo::PhaseStrategy strategy(void) const

References luci::fmt(), INFO, LOGGER, module(), luci::Module::size(), and strategy().

◆ notify() [4/4]

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

Definition at line 98 of file ProgressReporter.cpp.

99{
100 LOGGER(prime);
101
102 INFO(prime) << "ModulePhaseRunner<" << to_str(strategy()) << "> - done";
103}

References INFO, LOGGER, and strategy().

◆ strategy()

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

Definition at line 70 of file ProgressReporter.h.

70{ return _strategy; }

Referenced by notify(), and notify().


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