Skip to content

Commit 28596a3

Browse files
committed
add gflag ssa_graph_path
1 parent ad6c014 commit 28596a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

paddle/fluid/framework/details/multi_devices_graph_builder.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
#include <string>
3030
#include <vector>
3131

32+
DEFINE_string(ssa_graph_path, "/tmp/ssa_graph.dot",
33+
"the ssa graph path only print with GLOG_v=10,"
34+
"default /tmp/graph.dot");
35+
3236
namespace paddle {
3337
namespace framework {
3438
namespace details {
@@ -264,7 +268,7 @@ std::unique_ptr<SSAGraph> MultiDevSSAGraphBuilder::Build(
264268
AddOutputToLeafOps(&result);
265269

266270
if (VLOG_IS_ON(10)) {
267-
std::ofstream fout("/tmp/graph.dot");
271+
std::ofstream fout(FLAGS_ssa_graph_path);
268272
PrintGraphviz(*graph, fout);
269273
}
270274

0 commit comments

Comments
 (0)