ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::dumper::dot::DotDumper Class Reference

#include <DotDumper.h>

Public Types

enum  Level { OFF = 0 , ALL_BUT_CONSTANTS = 1 , ALL = 2 }
 

Public Member Functions

 DotDumper (Level level)
 
void dump (const ir::Graph &graph, const std::string &tag)
 Dump graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.
 
void dump (const compiler::ILoweredGraph &lowered_graph, const std::string &tag)
 Dump lowered graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.
 
void dump (const ir::train::TrainableGraph &graph, const std::string &tag)
 Dump graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.
 

Detailed Description

Definition at line 31 of file DotDumper.h.

Member Enumeration Documentation

◆ Level

Enumerator
OFF 
ALL_BUT_CONSTANTS 
ALL 

Definition at line 34 of file DotDumper.h.

35 {
36 OFF = 0, //< Do not dump
37 ALL_BUT_CONSTANTS = 1, //< Emit all operations and operands but constants
38 ALL = 2 //< Emit all operations and operands
39 };

Constructor & Destructor Documentation

◆ DotDumper()

onert::dumper::dot::DotDumper::DotDumper ( Level  level)
inline

Definition at line 42 of file DotDumper.h.

42: _level{level} {}

Member Function Documentation

◆ dump() [1/3]

void onert::dumper::dot::DotDumper::dump ( const compiler::ILoweredGraph lowered_graph,
const std::string &  tag 
)

Dump lowered graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.

Parameters
[in]graphThe graph that would be used to get operations and operands
[in]tagThe name of dot file that would be created
Returns
N/A

Definition at line 217 of file DotDumper.cc.

218{
219 if (_level == Level::OFF)
220 {
221 return;
222 }
223
224 auto dot_operands = generate_dot_operands(lowered_graph.graph(), _level);
225 auto dot_operations = generate_dot_operations(lowered_graph.graph(), dot_operands);
226 update_lower_info(lowered_graph, &dot_operands);
227 update_lower_info(lowered_graph, &dot_operations);
228 dump_to_file(dot_operands, dot_operations, tag);
229}

References onert::compiler::ILoweredGraph::graph().

◆ dump() [2/3]

void onert::dumper::dot::DotDumper::dump ( const ir::Graph graph,
const std::string &  tag 
)

Dump graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.

Parameters
[in]graphThe graph that would be used to get operations and operands
[in]tagThe name of dot file that would be created
Returns
N/A

Definition at line 204 of file DotDumper.cc.

205{
206 if (_level == Level::OFF)
207 {
208 return;
209 }
210
211 const auto dot_operands = generate_dot_operands(graph, _level);
212 const auto dot_operations = generate_dot_operations(graph, dot_operands);
213 dump_to_file(dot_operands, dot_operations, tag);
214}

Referenced by onert::compiler::Compiler::compile(), onert::compiler::MultiModelCompiler::compile(), and onert::compiler::train::TrainingCompiler::compile().

◆ dump() [3/3]

void onert::dumper::dot::DotDumper::dump ( const ir::train::TrainableGraph graph,
const std::string &  tag 
)

Dump graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.

Parameters
[in]graphTrainableGraph to be dumped
[in]tagThe name of dot file to be dumped
Returns
N/A

Definition at line 231 of file DotDumper.cc.

232{
233 dump(graph.graph(), tag);
234}
void dump(const ir::Graph &graph, const std::string &tag)
Dump graph information to dot file as tag name if "GRAPH_DOT_DUMP" is set.
Definition DotDumper.cc:204

References dump().


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