Browse Source

change star elimination: remove some redundant and checking works

tags/v0.2.0-alpha
Xiaoda Zhang 5 years ago
parent
commit
c080ec7874
1 changed files with 5 additions and 8 deletions
  1. +5
    -8
      mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc

+ 5
- 8
mindspore/ccsrc/parallel/auto_parallel/graph_costmodel.cc 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) {


Loading…
Cancel
Save