!29400 set specialized flag for clone in closure conversion

Merge pull request !29400 from xychow/set-specialized-after-clone
This commit is contained in:
i-robot 2022-01-24 09:33:06 +00:00 committed by Gitee
commit 3b704f3aff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 2 deletions

View File

@ -169,7 +169,7 @@ class MS_CORE_API FuncGraphAbstractClosure final : public AbstractFuncAtom {
bool specialized() const { return specialized_; }
AbstractFunctionPtr Copy() const override {
return std::make_shared<FuncGraphAbstractClosure>(func_graph_, context_, tracking_id());
return std::make_shared<FuncGraphAbstractClosure>(func_graph_, context_, tracking_id(), specialized_);
}
bool operator==(const AbstractFunction &other) const override;

View File

@ -406,7 +406,7 @@ void FilterMonadInput(const AnfNodePtrList &old_inputs, AnfNodePtrList *new_inpu
AnfNodePtr BuildFuncGraphValueNode(const FuncGraphPtr &func_graph) {
auto new_node = NewValueNode(func_graph);
auto abstract = std::make_shared<abstract::FuncGraphAbstractClosure>(
func_graph, abstract::AnalysisContext::DummyContext(), new_node);
func_graph, abstract::AnalysisContext::DummyContext(), new_node, true);
new_node->set_abstract(abstract);
return new_node;
}