!53 [Auto parallel] Remove the redundant work in star elimination

Merge pull request !53 from Xiaoda/modify_star_and_triangle_elimination
This commit is contained in:
mindspore-ci-bot 2020-04-01 11:43:31 +08:00 committed by Gitee
commit 569e5b056e
1 changed files with 5 additions and 8 deletions

View File

@ -1210,19 +1210,16 @@ void CostGraph::CreateStarEliminationCostList(std::vector<std::shared_ptr<Edge>>
MS_EXCEPTION_IF_NULL(succ_node_cost);
for (auto& succ_edge_cost : succ_edge_clist) {
MS_EXCEPTION_IF_NULL(succ_edge_cost);
if ((succ_node_cost->memory_cost_ < DEVICE_MEMORY_CAPACITY) &&
(succ_edge_cost->memory_cost_ < DEVICE_MEMORY_CAPACITY)) {
succ_nodes_stras[k] = succ_node_stra;
succ_edges_costs[k] = succ_edge_cost;
succ_nodes_costs[k] = succ_node_cost;
recursive(k + 1);
}
succ_nodes_stras[k] = succ_node_stra;
succ_edges_costs[k] = succ_edge_cost;
succ_nodes_costs[k] = succ_node_cost;
recursive(k + 1);
}
}
}
};
recursive(0);
recursive(1);
}
std::vector<std::shared_ptr<Edge>> CostGraph::EliminationStar(const OperatorInfoPtr& merged_op) {