Browse Source

!12858 [auto-monad] Fix bug that no abstract set for const UMonad node

From: @hwhewei
Reviewed-by: 
Signed-off-by:
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
42440ce944
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      mindspore/ccsrc/backend/optimizer/pass/communication_op_fusion.cc

+ 2
- 1
mindspore/ccsrc/backend/optimizer/pass/communication_op_fusion.cc View File

@@ -224,7 +224,8 @@ static void AdjustAllReduceInputWithLoad(const CNodePtr &cnode) {
return search_cnode->input(2)->isa<CNode>(); return search_cnode->input(2)->isa<CNode>();
}); });
if (cnode_load != nullptr) { if (cnode_load != nullptr) {
const auto &const_u_monad = NewValueNode(kUMonad);
auto const_u_monad = NewValueNode(kUMonad);
const_u_monad->set_abstract(kUMonad->ToAbstract());
const auto &cnode_u = cnode_load->input(2); const auto &cnode_u = cnode_load->input(2);
MS_LOG(DEBUG) << "Replace Load with CNode U to constant U for cnode: " << cnode_load->DebugString(); MS_LOG(DEBUG) << "Replace Load with CNode U to constant U for cnode: " << cnode_load->DebugString();
MS_EXCEPTION_IF_NULL(cnode->func_graph()); MS_EXCEPTION_IF_NULL(cnode->func_graph());


Loading…
Cancel
Save