diff --git a/ge/graph/build/model_builder.cc b/ge/graph/build/model_builder.cc index 7256c7be..8d4a17d8 100755 --- a/ge/graph/build/model_builder.cc +++ b/ge/graph/build/model_builder.cc @@ -261,7 +261,9 @@ Status ModelBuilder::SetInputOutputDesc() { GE_IF_BOOL_EXEC(n->GetInAllNodes().empty() && n->GetOutAllNodes().empty(), continue;); SetInputIsConst(n); - if (IsGeLocalOp(n->GetOpDesc())) { + bool is_unknow = false; + (void)NodeUtils::GetNodeUnknownShapeStatus(*n, is_unknow); + if ((IsGeLocalOp(n->GetOpDesc())) && (!is_unknow)) { GE_CHK_STATUS_RET(CalcOutputSize(n), "Calculate output size failed"); } ret = AdjustConstWeightSize(n, weight_offset_); diff --git a/ge/graph/passes/resource_pair_add_control_pass.cc b/ge/graph/passes/resource_pair_add_control_pass.cc index 432bff9e..2e6dc3a6 100755 --- a/ge/graph/passes/resource_pair_add_control_pass.cc +++ b/ge/graph/passes/resource_pair_add_control_pass.cc @@ -63,16 +63,17 @@ Status ResourcePairAddControlPass::Run(ComputeGraphPtr graph) { NodePtr from_node = prefix_2_node.second; GE_CHECK_NOTNULL(from_node); auto to_item_prefix_2_node = prefix_2_node_per_type.find(resource_type_pair.second); + // stackpush and stackpop may exist in two subgraphs, no necessary to report error if (to_item_prefix_2_node == prefix_2_node_per_type.end()) { - GELOGE(PARAM_INVALID, "find peer type node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), + GELOGW("find peer type node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), resource_type_pair.first.c_str(), resource_type_pair.second.c_str()); - return PARAM_INVALID; + continue; } auto to_prefix_2_node = to_item_prefix_2_node->second.find(prefix); if (to_prefix_2_node == to_item_prefix_2_node->second.end()) { - GELOGE(PARAM_INVALID, "find peer prefix node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), + GELOGw("find peer prefix node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), resource_type_pair.first.c_str(), resource_type_pair.second.c_str()); - return PARAM_INVALID; + continue; } NodePtr to_node = to_prefix_2_node->second; GE_CHECK_NOTNULL(to_node); diff --git a/ge/graph/passes/resource_pair_remove_control_pass.cc b/ge/graph/passes/resource_pair_remove_control_pass.cc index 83fc7081..7048ed1d 100755 --- a/ge/graph/passes/resource_pair_remove_control_pass.cc +++ b/ge/graph/passes/resource_pair_remove_control_pass.cc @@ -63,16 +63,17 @@ Status ResourcePairRemoveControlPass::Run(ComputeGraphPtr graph) { NodePtr from_node = prefix_2_node.second; GE_CHECK_NOTNULL(from_node); auto to_item_prefix_2_node = prefix_2_node_per_type.find(resource_type_pair.second); + // stackpush and stackpop may exist in two subgraphs, no necessary to report error if (to_item_prefix_2_node == prefix_2_node_per_type.end()) { - GELOGE(INTERNAL_ERROR, "find peer type node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), + GELOGW("find peer type node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), resource_type_pair.first.c_str(), resource_type_pair.second.c_str()); - return domi::PARAM_INVALID; + continue; } auto to_prefix_2_node = to_item_prefix_2_node->second.find(prefix); if (to_prefix_2_node == to_item_prefix_2_node->second.end()) { - GELOGE(INTERNAL_ERROR, "find peer prefix node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), + GELOGW("find peer prefix node fail, suffix:%s, from_type:%s, to_type:%s", prefix.c_str(), resource_type_pair.first.c_str(), resource_type_pair.second.c_str()); - return domi::PARAM_INVALID; + continue; } NodePtr to_node = to_prefix_2_node->second; GE_CHECK_NOTNULL(to_node);