Skip to content

Commit f1046d7

Browse files
authored
Merge pull request #14335 from wojtuss/wojtuss/add-graph-viz
added additional call to graph_viz_pass
2 parents 98f38ae + 7fd640b commit f1046d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/inference/analysis/analyzer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Analyzer::Analyzer() { Register("manager1", new DfgPassManagerImpl); }
101101

102102
void Analyzer::Run(Argument* argument) {
103103
std::vector<std::string> passes;
104+
passes.push_back("graph_viz_pass"); // add graphviz for debug.
104105
#ifdef PADDLE_WITH_MKLDNN
105106
if (use_mkldnn_) {
106107
VLOG(3) << "Adding MKL-DNN placement pass";
@@ -110,13 +111,13 @@ void Analyzer::Run(Argument* argument) {
110111
// infer_clean_graph_pass should be the first default pass
111112
// after mkldnn_placement_pass.
112113
passes.push_back("infer_clean_graph_pass");
114+
passes.push_back("graph_viz_pass"); // add graphviz for debug.
113115
for (auto& pass : ir_passes_) {
114116
if (!disabled_ir_passes_.count(pass)) {
115117
passes.push_back(pass);
116118
passes.push_back("graph_viz_pass"); // add graphviz for debug.
117119
}
118120
}
119-
passes.push_back("graph_viz_pass");
120121
argument->Set(kFluidToIrPassesAttr, new std::vector<std::string>(passes));
121122

122123
for (auto& x : data_) {

0 commit comments

Comments
 (0)