Skip to content

Commit

Permalink
fix: cannot build
Browse files Browse the repository at this point in the history
  • Loading branch information
HermitSun committed Dec 22, 2023
1 parent 970ea29 commit ea60329
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ namespace phi {
namespace distributed {

namespace {
std::string GenUniqueCommKey(const std::vector<int64_t>& process_ids) {
std::string unique_comm_key = "ReshardGroup";
for (const auto& id : process_ids) {
unique_comm_key += "/" + std::to_string(id);
}
return unique_comm_key;
}
} // namespace

std::vector<int64_t> GetUnionProcessIds(std::vector<int64_t> in_process_ids,
std::vector<int64_t> out_process_ids) {
std::vector<int64_t> result;
Expand All @@ -40,15 +49,6 @@ std::vector<int64_t> GetUnionProcessIds(std::vector<int64_t> in_process_ids,
return result;
}

std::string GenUniqueCommKey(const std::vector<int64_t>& process_ids) {
std::string unique_comm_key = "ReshardGroup";
for (const auto& id : process_ids) {
unique_comm_key += "/" + std::to_string(id);
}
return unique_comm_key;
}
} // namespace

int64_t GetLocalRankInParticipate(const std::vector<int64_t>& process_ids,
int64_t global_rank) {
if (global_rank == -1) {
Expand Down

0 comments on commit ea60329

Please sign in to comment.