From 28596a3386349c939c6e513e1d9fdc8a78553312 Mon Sep 17 00:00:00 2001 From: Yancey1989 Date: Mon, 28 May 2018 15:50:39 +0800 Subject: [PATCH] add gflag ssa_graph_path --- .../fluid/framework/details/multi_devices_graph_builder.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/details/multi_devices_graph_builder.cc b/paddle/fluid/framework/details/multi_devices_graph_builder.cc index 25711e0e47f..d21e0f7b96c 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_builder.cc +++ b/paddle/fluid/framework/details/multi_devices_graph_builder.cc @@ -29,6 +29,10 @@ #include #include +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 framework { namespace details { @@ -264,7 +268,7 @@ std::unique_ptr MultiDevSSAGraphBuilder::Build( AddOutputToLeafOps(&result); if (VLOG_IS_ON(10)) { - std::ofstream fout("/tmp/graph.dot"); + std::ofstream fout(FLAGS_ssa_graph_path); PrintGraphviz(*graph, fout); } -- GitLab