Skip to content

Commit

Permalink
fix cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
ForFishes committed Feb 28, 2022
1 parent 195d631 commit 5451638
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions paddle/fluid/distributed/collective/reducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ std::vector<std::vector<size_t>> Eager_AssignGroupBySize(
}
return true;
};

PADDLE_ENFORCE_EQ(true, check_perm(tensor_indices),
platform::errors::PreconditionNotMet(
"tensor_indices must be a permutation from 0 to %lu",
Expand All @@ -49,12 +50,11 @@ std::vector<std::vector<size_t>> Eager_AssignGroupBySize(

// Key: the var type
// Value: should use which index in group_size_limits for group size limit
std::unordered_map<experimental::DataType, size_t> group_limit_index;
std::map<experimental::DataType, size_t> group_limit_index;

// Key: the var type
// Value: <the var index in input tensors, total numel in this group>
std::unordered_map<experimental::DataType,
std::pair<std::vector<size_t>, size_t>>
std::map<experimental::DataType, std::pair<std::vector<size_t>, size_t>>
next_group;

for (size_t i = 0; i < tensors.size(); ++i) {
Expand Down
3 changes: 1 addition & 2 deletions paddle/fluid/distributed/collective/reducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@

#pragma once

#include <unordered_map>
#include <map>
#include <vector>
#include "paddle/fluid/distributed/collective/ProcessGroup.h"
#include "paddle/fluid/eager/api/utils/tensor_utils.h"
#include "paddle/phi/common/data_type.h"

namespace paddle {
namespace distributed {
Expand Down

1 comment on commit 5451638

@paddle-bot-old
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulation! Your pull request passed all required CI. You could ask reviewer(s) to approve and merge. 🎉

Please sign in to comment.