Skip to content

Commit

Permalink
load all node files in one thread when FLAGS_graph_load_in_parallel o…
Browse files Browse the repository at this point in the history
  • Loading branch information
miaoli06 authored Jul 15, 2022
1 parent 22e1835 commit ce40d68
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions paddle/fluid/distributed/ps/table/common_graph_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1106,16 +1106,15 @@ int32_t GraphTable::load_node_and_edge_file(std::string etype,
if (ntypes.size() == 0) {
VLOG(0) << "node_type not specified, nothing will be loaded ";
return 0;
}

if (FLAGS_graph_load_in_parallel) {
this->load_nodes(npath_str, "");
} else {
for (size_t i = 0; i < ntypes.size(); i++) {
if (feature_to_id.find(ntypes[i]) == feature_to_id.end()) {
VLOG(0) << "node_type " << ntypes[i]
<< "is not defined, will not load";
return 0;
}
for (size_t j = 0; j < ntypes.size(); j++) {
this->load_nodes(npath_str, ntypes[j]);
}
}
this->load_nodes(npath_str, "");
}
}
return 0;
}));
Expand Down

0 comments on commit ce40d68

Please sign in to comment.