From fb00dae17a9ac0a2ef61ed9b63f8855a89962e3a Mon Sep 17 00:00:00 2001 From: Xiaoda Zhang Date: Tue, 31 Mar 2020 14:55:31 +0800 Subject: [PATCH] change star elimination: remove some redundant and checking works --- .../ccsrc/parallel/auto_parallel/graph_costmodel.cc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc b/mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc index d30522c2f..292cc4f5f 100644 --- a/mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc +++ b/mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc @@ -1210,19 +1210,16 @@ void CostGraph::CreateStarEliminationCostList(std::vector> 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> CostGraph::EliminationStar(const OperatorInfoPtr& merged_op) { -- GitLab