!29523 Fix the problem that some abstracts is not updated caused by the call_graph_tuple_transform.
Merge pull request !29523 from liqiliang/fix_graph_transform
This commit is contained in:
commit
9dc49bc766
|
@ -95,7 +95,8 @@ AnfNodePtr TransformCallGraph(const FuncGraphPtr &trans_fg, const CNodePtr &cnod
|
|||
}
|
||||
}
|
||||
auto new_node = fg->NewCNode(inputs);
|
||||
new_node->set_abstract(cnode->abstract());
|
||||
// Because the current pass involves the operation of changing the graph,
|
||||
// so the abstract of this new_node cannot be set here, otherwise the Renormalize() will not be called.
|
||||
return new_node;
|
||||
}
|
||||
|
||||
|
@ -140,7 +141,8 @@ AnfNodePtr TransformSwitchCall(const AnfNodePtr &switch_node, const CNodePtr &cn
|
|||
}
|
||||
}
|
||||
auto new_node = fg->NewCNode(inputs);
|
||||
new_node->set_abstract(cnode->abstract());
|
||||
// Because the current pass involves the operation of changing the graph,
|
||||
// so the abstract of this new_node cannot be set here, otherwise the Renormalize() will not be called.
|
||||
return new_node;
|
||||
}
|
||||
} // namespace opt
|
||||
|
|
|
@ -239,7 +239,7 @@ OptimizeIRPassLib::OptimizeIRPassLib() {
|
|||
|
||||
// tuple parameter graph transform
|
||||
call_graph_tuple_transform_ =
|
||||
MakeSubstitution(std::make_shared<CallGraphTupleTransform>(), "graph_param_transorm", IsCNode);
|
||||
MakeSubstitution(std::make_shared<CallGraphTupleTransform>(), "graph_param_transform", IsCNode);
|
||||
|
||||
// RowTensor Eliminate
|
||||
row_tensor_eliminate_ = MakeSubstitution(
|
||||
|
|
Loading…
Reference in New Issue