| @@ -26,6 +26,7 @@ | |||||
| #include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
| #include "framework/common/ge_inner_error_codes.h" | #include "framework/common/ge_inner_error_codes.h" | ||||
| #include "framework/omg/omg_inner_types.h" | #include "framework/omg/omg_inner_types.h" | ||||
| #include "framework/omg/parser/parser_inner_ctx.h" | |||||
| #include "graph/debug/ge_attr_define.h" | #include "graph/debug/ge_attr_define.h" | ||||
| #include "graph/common/local_context.h" | #include "graph/common/local_context.h" | ||||
| #include "graph/passes/pass_utils.h" | #include "graph/passes/pass_utils.h" | ||||
| @@ -414,7 +415,7 @@ Status NetOutputPass::ProcessWithNetoutput(const ge::ComputeGraphPtr &graph, con | |||||
| Status NetOutputPass::AddCtrlEdgesBetweenLeafAndNetOutput(const ge::ComputeGraphPtr &graph, | Status NetOutputPass::AddCtrlEdgesBetweenLeafAndNetOutput(const ge::ComputeGraphPtr &graph, | ||||
| const ge::NodePtr &net_out_node) { | const ge::NodePtr &net_out_node) { | ||||
| GE_CHECK_NOTNULL(net_out_node); | GE_CHECK_NOTNULL(net_out_node); | ||||
| if (!GetLocalOmgContext().user_out_nodes.empty()) { | |||||
| if (!GetLocalOmgContext().user_out_nodes.empty() || !GetParserContext().user_out_nodes.empty()) { | |||||
| GELOGI("No need to add ctrl edge to netoutput because user out nodes have been set."); | GELOGI("No need to add ctrl edge to netoutput because user out nodes have been set."); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||