From ef63b2207ae8f3ffd3df1277175f26af84349d64 Mon Sep 17 00:00:00 2001 From: wuweikang Date: Fri, 11 Dec 2020 16:00:13 +0800 Subject: [PATCH] add ATTR_NAME_ROOT_GRAPH_ID --- ge/graph/manager/graph_manager.cc | 5 ++++- metadef | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ge/graph/manager/graph_manager.cc b/ge/graph/manager/graph_manager.cc index 9ce68d76..90437d77 100755 --- a/ge/graph/manager/graph_manager.cc +++ b/ge/graph/manager/graph_manager.cc @@ -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, diff --git a/metadef b/metadef index d19c9c5c..bd2cfdfa 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit d19c9c5c92f21a0335c18681dcceed44f3a54ddc +Subproject commit bd2cfdfa85a3d9dcbd7dc825f5759c7f8b3ffa9a