add gflag ssa_graph_path

release/0.13.0
Yancey1989 7 years ago
parent ad6c0142c4
commit 28596a3386

@ -29,6 +29,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
DEFINE_string(ssa_graph_path, "/tmp/ssa_graph.dot",
"the ssa graph path only print with GLOG_v=10,"
"default /tmp/graph.dot");
namespace paddle { namespace paddle {
namespace framework { namespace framework {
namespace details { namespace details {
@ -264,7 +268,7 @@ std::unique_ptr<SSAGraph> MultiDevSSAGraphBuilder::Build(
AddOutputToLeafOps(&result); AddOutputToLeafOps(&result);
if (VLOG_IS_ON(10)) { if (VLOG_IS_ON(10)) {
std::ofstream fout("/tmp/graph.dot"); std::ofstream fout(FLAGS_ssa_graph_path);
PrintGraphviz(*graph, fout); PrintGraphviz(*graph, fout);
} }

Loading…
Cancel
Save