From eaacdb2bc142887bf2a46cc99cbdbd2d72bb86f7 Mon Sep 17 00:00:00 2001 From: zhangxiaokun Date: Thu, 28 Jan 2021 08:41:40 +0800 Subject: [PATCH] Delete StreamAllocator::ReorderEventNodes --- ge/graph/build/stream_allocator.cc | 18 +----------------- ge/graph/build/stream_allocator.h | 1 - ge/graph/build/task_generator.cc | 7 ------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/ge/graph/build/stream_allocator.cc b/ge/graph/build/stream_allocator.cc index 88ffda02..d90d1f40 100644 --- a/ge/graph/build/stream_allocator.cc +++ b/ge/graph/build/stream_allocator.cc @@ -1226,7 +1226,7 @@ Status StreamAllocator::InsertSyncEventNodes() { } } - Status status = ReorderEventNodes(); + Status status = whole_graph_->InsertGraphEvents(); if (status != SUCCESS) { GELOGE(status, "Graph ReorderEventNodes failed"); return status; @@ -1235,22 +1235,6 @@ Status StreamAllocator::InsertSyncEventNodes() { return SUCCESS; } -Status StreamAllocator::ReorderEventNodes() const { - Status status = whole_graph_->InsertEventNodes(); - if (status != SUCCESS) { - GELOGE(status, "Whole graph InsertEventNodes failed"); - return status; - } - for (const auto &subgraph : whole_graph_->GetAllSubgraphs()) { - status = subgraph->InsertEventNodes(); - if (status != SUCCESS) { - GELOGE(status, "Subgraph %s InsertEventNodes failed", subgraph->GetName().c_str()); - return status; - } - } - return SUCCESS; -} - void StreamAllocator::DumpEvents() { map> after_refresh_stream_nodes; for (const auto &node : whole_graph_->GetNodes(whole_graph_->GetGraphUnknownFlag())) { diff --git a/ge/graph/build/stream_allocator.h b/ge/graph/build/stream_allocator.h index a21b2f77..dd82700d 100644 --- a/ge/graph/build/stream_allocator.h +++ b/ge/graph/build/stream_allocator.h @@ -74,7 +74,6 @@ class StreamAllocator { Status RefreshContinuousEvents(); Status InsertSyncEventNodes(); - Status ReorderEventNodes() const; void DumpEvents(); diff --git a/ge/graph/build/task_generator.cc b/ge/graph/build/task_generator.cc index 8bd7d32e..1bc0c899 100755 --- a/ge/graph/build/task_generator.cc +++ b/ge/graph/build/task_generator.cc @@ -533,13 +533,6 @@ Status TaskGenerator::MarkNodeAndSetIndex(ComputeGraphPtr &graph) { return GE_GRAPH_GRAPH_NODE_NULL; } - int64_t node_index = 0; - for (auto &node : all_nodes) { - OpDescPtr op_desc = node->GetOpDesc(); - GE_CHECK_NOTNULL(op_desc); - op_desc->SetId(node_index++); - } - map> all_stream_ops; for (auto &node : all_nodes) { OpDescPtr op_desc = node->GetOpDesc();