提交 72910ebc 编写于 作者: N Niu Chong 提交者: Jinhui Yuan

fix(compiler.cpp): only add ctrl edge in reduce struct when training (#1028)

上级 339d56ee
......@@ -60,7 +60,7 @@ Plan Compiler::DoCompile() {
task_gph->ForEachNode(std::bind(&TaskNode::EraseEmptyProducedRegst, _1));
task_gph->ForEachNode(std::bind(&TaskNode::ClearOutOfDateConsumedRegst, _1));
task_gph->AddOrderingCtrlEdgeInSameChain();
if (Global<JobDesc>::Get()->other_conf().use_ordered_allreduce_in_mdupdt()) {
if (job_desc->IsTrain() && job_desc->other_conf().use_ordered_allreduce_in_mdupdt()) {
task_gph->AddCtrlEdgeInReduceStruct();
}
if (job_desc->IsTrain()) { task_gph->AddOrderCtrlEdgeBetweenCopyAndMdUpdt(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册