提交 e2e8e875 编写于 作者: W willzhang4a58

refine logical gph

上级 50876518
...@@ -38,10 +38,8 @@ void LogicalGraph::BuildGraphStruct(const DLNetConf& dl_net_conf) { ...@@ -38,10 +38,8 @@ void LogicalGraph::BuildGraphStruct(const DLNetConf& dl_net_conf) {
void LogicalGraph::FillNodeWithParallelDesc(const Strategy& strategy_conf) { void LogicalGraph::FillNodeWithParallelDesc(const Strategy& strategy_conf) {
HashMap<std::string, LogicalNode*> op_name2node; HashMap<std::string, LogicalNode*> op_name2node;
for (const std::unique_ptr<LogicalNode>& logical_node : nodes()) { for (const std::unique_ptr<LogicalNode>& logical_node : nodes()) {
std::string op_name = logical_node->op()->op_name(); const std::string& op_name = logical_node->op()->op_name();
bool emplace_success = CHECK(op_name2node.emplace(op_name, logical_node.get()).second);
op_name2node.emplace(op_name, logical_node.get()).second;
CHECK_EQ(emplace_success, true);
} }
for (int gid = 0; gid < strategy_conf.placement_groups_size(); ++gid) { for (int gid = 0; gid < strategy_conf.placement_groups_size(); ++gid) {
const PlacementGroup& cur_group = strategy_conf.placement_groups(gid); const PlacementGroup& cur_group = strategy_conf.placement_groups(gid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册