!1031 Delete StreamAllocator::ReorderEventNodes

From: @zhangxiaokun9
Reviewed-by: @xchu42,@wangxiaotian22
Signed-off-by: @ji_chen
pull/1031/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 49a67c1177

@ -1226,7 +1226,7 @@ Status StreamAllocator::InsertSyncEventNodes() {
} }
} }
Status status = ReorderEventNodes(); Status status = whole_graph_->InsertGraphEvents();
if (status != SUCCESS) { if (status != SUCCESS) {
GELOGE(status, "Graph ReorderEventNodes failed"); GELOGE(status, "Graph ReorderEventNodes failed");
return status; return status;
@ -1235,22 +1235,6 @@ Status StreamAllocator::InsertSyncEventNodes() {
return SUCCESS; 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() { void StreamAllocator::DumpEvents() {
map<int64_t, vector<NodePtr>> after_refresh_stream_nodes; map<int64_t, vector<NodePtr>> after_refresh_stream_nodes;
for (const auto &node : whole_graph_->GetNodes(whole_graph_->GetGraphUnknownFlag())) { for (const auto &node : whole_graph_->GetNodes(whole_graph_->GetGraphUnknownFlag())) {

@ -74,7 +74,6 @@ class StreamAllocator {
Status RefreshContinuousEvents(); Status RefreshContinuousEvents();
Status InsertSyncEventNodes(); Status InsertSyncEventNodes();
Status ReorderEventNodes() const;
void DumpEvents(); void DumpEvents();

@ -533,13 +533,6 @@ Status TaskGenerator::MarkNodeAndSetIndex(ComputeGraphPtr &graph) {
return GE_GRAPH_GRAPH_NODE_NULL; 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<int64_t, vector<OpDescPtr>> all_stream_ops; map<int64_t, vector<OpDescPtr>> all_stream_ops;
for (auto &node : all_nodes) { for (auto &node : all_nodes) {
OpDescPtr op_desc = node->GetOpDesc(); OpDescPtr op_desc = node->GetOpDesc();

Loading…
Cancel
Save