!591 add ATTR_NAME_ROOT_GRAPH_ID

From: @HW_KK
Reviewed-by: @ji_chen,@youui
Signed-off-by: @ji_chen
pull/591/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit c54d3ed3eb

@ -2466,7 +2466,6 @@ Status GraphManager::ProcessSubGraphWithMultiThreads(GraphManager *graph_manager
GetContext().SetSessionId(session_id);
GetThreadLocalContext() = ge_context;
graph_manager->UpdateLocalOmgContext(root_graph_id);
ComputeGraphPtr compute_graph_tmp = sub_graph_info_ptr->GetSubGraph();
const std::string &engine_name = sub_graph_info_ptr->GetEngineName();
GELOGD("ProcessSubGraphWithMultiThreads start, graph name is %s, engine_name is %s, thread id is %lu",
@ -2474,6 +2473,10 @@ Status GraphManager::ProcessSubGraphWithMultiThreads(GraphManager *graph_manager
pthread_self());
GE_DUMP(compute_graph_tmp, "OptimizeSubGraphBefore");
GE_CHECK_NOTNULL(compute_graph_tmp);
if (!AttrUtils::SetInt(*compute_graph_tmp, ATTR_NAME_ROOT_GRAPH_ID, root_graph_id)) {
GELOGE(FAILED, "Failed to set attr ATTR_NAME_ROOT_GRAPH_ID for subgraph, graph_id: %u.", root_graph_id);
return FAILED;
}
compute_graph_tmp->SetSessionID(session_id);
Status ret = graph_manager->GetCompilerStages(root_graph_id).optimizer.OptimizeSubGraph(compute_graph_tmp,
compute_graph,

Loading…
Cancel
Save