!29400 set specialized flag for clone in closure conversion
Merge pull request !29400 from xychow/set-specialized-after-clone
This commit is contained in:
commit
3b704f3aff
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue