!29306 Remove specilized flag check

Merge pull request !29306 from chenfei_mindspore/rm-specialized-flag
This commit is contained in:
i-robot 2022-01-19 14:12:02 +00:00 committed by Gitee
commit a6faf2160e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ std::string GetAbstractFuncStr(const abstract::AbstractFunctionPtr &abs) {
std::ostringstream oss;
if (abs->isa<abstract::FuncGraphAbstractClosure>()) {
const auto &abstract_func_graph = abs->cast<abstract::FuncGraphAbstractClosurePtr>();
if (abstract_func_graph->specialized()) {
if (abstract_func_graph->func_graph() != nullptr) {
oss << abstract_func_graph->func_graph()->ToString();
}
}
@ -32,7 +32,7 @@ std::string GetAbstractFuncStr(const abstract::AbstractFunctionPtr &abs) {
const auto &abstract_fn = abstract_partial_func->fn();
if (abstract_fn->isa<abstract::FuncGraphAbstractClosure>()) {
const auto &abstract_func_graph = abstract_fn->cast<abstract::FuncGraphAbstractClosurePtr>();
if (abstract_func_graph->specialized()) {
if (abstract_func_graph->func_graph() != nullptr) {
oss << "Partial(" << abstract_func_graph->func_graph()->ToString() << ")";
}
}

View File

@ -1523,8 +1523,8 @@ FuncGraphPtr GetFuncGraph(const abstract::AbstractBasePtr &abs, const AnfNodePtr
if (abs->isa<abstract::FuncGraphAbstractClosure>()) {
auto abs_func_graph = abs->cast<abstract::FuncGraphAbstractClosurePtr>();
if (!abs_func_graph->specialized()) {
MS_LOG(EXCEPTION) << "Unspecilized func graph abstract: " << abs_func_graph->ToString()
<< ", node: " << anf_node->DebugString();
MS_LOG(INFO) << "Unspecilized func graph abstract: " << abs_func_graph->ToString()
<< ", node: " << anf_node->DebugString();
}
return abs_func_graph->func_graph();
}