Skip to content

Commit 1fa1352

Browse files
committed
Remove hack code
1 parent bce6986 commit 1fa1352

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

paddle/fluid/framework/details/multi_devices_graph_builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ std::unique_ptr<SSAGraph> MultiDevSSAGraphBuilder::Build(
213213
var_name_on_devices[op_dev_id].emplace(var_name);
214214
}
215215
}
216-
if (!is_forwarding) {
216+
if (!is_forwarding && places_.size() > 1) {
217217
// Currently, we assume that once gradient is generated, it can be
218218
// broadcast, and each gradient is only broadcast once.
219219
if (static_cast<bool>(boost::get<int>(op->GetAttr(

python/paddle/fluid/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __bootstrap__():
116116

117117
read_env_flags = [
118118
'use_pinned_memory', 'check_nan_inf', 'benchmark', 'warpctc_dir',
119-
'eager_delete_scope', 'debug_ssa_graphviz_filename'
119+
'eager_delete_scope'
120120
]
121121
if core.is_compiled_with_cuda():
122122
read_env_flags += [

0 commit comments

Comments
 (0)