Moved const multiply to ArithmeticSimplify2 to solve issue with auto-parallel failing because the shape is not yet set. Issue #67

This commit is contained in:
Giancarlo Colmenares 2020-08-18 10:44:02 -04:00
parent 82e8884eb5
commit 06f43572fb
1 changed files with 3 additions and 1 deletions

View File

@ -53,7 +53,9 @@ AnfNodePtr ArithmeticSimplify::operator()(const OptimizerPtr &, const AnfNodePtr
auto ttmul = NewCNode({mul_node, const_.GetNode(node), const_2.GetNode(node)}, node->func_graph());
return NewCNode({mul_node, x.GetNode(node), ttmul}, node->func_graph());
}
return NewCNode({mul_node, x.GetNode(node), new_mul_tensor}, node->func_graph());
auto new_cnode = NewCNode({mul_node, x.GetNode(node), new_mul_tensor}, node->func_graph());
new_cnode->set_abstract(node->abstract());
return new_cnode;
};
MATCH_REPLACE_LAMBDA(node, const_ * (const_2 * x), const_dup_lambda);