ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::DumperPass Class Reference

Dumps the graph to a dot file named number%.dot where number% is how many times the graph was dumped. More...

#include <DumperPass.h>

Collaboration diagram for nnc::DumperPass:

Public Member Functions

 DumperPass (std::string s)
 
PassData run (PassData data) override
 run compiler pass
 
- Public Member Functions inherited from nnc::Pass
virtual void cleanup ()
 clean compiler pass data
 
virtual ~Pass ()=default
 
virtual std::string getName ()
 

Detailed Description

Dumps the graph to a dot file named number%.dot where number% is how many times the graph was dumped.

Definition at line 29 of file DumperPass.h.

Constructor & Destructor Documentation

◆ DumperPass()

nnc::DumperPass::DumperPass ( std::string  s)
inlineexplicit

Definition at line 32 of file DumperPass.h.

32: _file_name(std::move(s)) {}

Member Function Documentation

◆ run()

PassData nnc::DumperPass::run ( PassData  data)
overridevirtual

run compiler pass

Parameters
data- data that pass is taken
Returns
data that can be passed to the next pass
Exceptions
PassExceptionobject if errors occured

Implements nnc::Pass.

Definition at line 29 of file DumperPass.cpp.

30{
31 auto graph = static_cast<Graph *>(data);
32 assert(graph && "graph object is expected");
33 std::ofstream stream(std::to_string(_counter++) + "_" + _file_name + ".dot");
34 dumpGraph(graph, stream);
35 return graph;
36}
void dumpGraph(const Graph *graph, std::ostream &stream)

References mir::dumpGraph().

Referenced by package.infer.session::inference().


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