Browse Source

!1577 fix reshape reshape case in auto parallel for r0.3

Merge pull request !1577 from yao_yf/fix_reshape_reshape_r0.3_
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 6 years ago
parent
commit
76befd5703
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      mindspore/ccsrc/optimizer/irpass/reshape_eliminate.h

+ 3
- 1
mindspore/ccsrc/optimizer/irpass/reshape_eliminate.h View File

@@ -88,7 +88,9 @@ class TwoReshapeEliminater : public AnfVisitor {

auto fg = node->func_graph();
if (fg != nullptr && x_ != nullptr && shape_ != nullptr) {
return fg->NewCNode({NewValueNode(prim_), x_, shape_});
auto new_node = fg->NewCNode({NewValueNode(prim_), x_, shape_});
new_node->set_abstract(node->abstract());
return new_node;
}
return nullptr;
}


Loading…
Cancel
Save