未验证 提交 d6fef01c 编写于 作者: R Ruibiao Chen 提交者: GitHub

Add FLAGS for communication op dependency in standalone executor (#49291)

上级 f0f4dd1e
......@@ -17,6 +17,13 @@
#include <queue>
#include "paddle/fluid/framework/new_executor/interpreter/interpreter_util.h"
PADDLE_DEFINE_EXPORTED_bool(
add_dependency_for_communication_op,
true,
"Whether to add dependency for communication Ops. It is just a temporary "
"FLAGS especially for auto parallel to avoid the concurrency damage by the "
"communication dependency added in standalone executor.");
// The difference between "sequential_run" and "serial_run":
// "sequential_run" dispatches OPs one by one according to the sequence in the
// Program, while "serial_run" ensures that all Ops are scheduled in a singal
......@@ -71,7 +78,11 @@ const std::map<size_t, std::set<size_t>>& DependencyBuilder::Build(
}
AddDependencyForCoalesceTensorOp();
AddDependencyForCommunicationOp();
if (FLAGS_add_dependency_for_communication_op) {
AddDependencyForCommunicationOp();
}
AddDependencyForRandomOp();
AddDependencyForReadOp();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册