aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instructions.cc
diff options
context:
space:
mode:
authorGravatar Benjamin Kramer <kramerb@google.com>2018-08-30 13:59:11 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-30 14:03:08 -0700
commitfeffc075befac53dddc721572493796c8fbffe3c (patch)
tree437de0f7e0dabfbea9782ac0c074d57ed2c1c75f /tensorflow/compiler/xla/service/hlo_instructions.cc
parentf207dd8964be31ee33e733367f1c9b7325479482 (diff)
[XLA] xla::ContainersEqual -> absl::c_equal
The replacement for the initializer_list overload is a bit sad because MakeSpan doesn't understand initializer_list (and we don't have CTAD yet) PiperOrigin-RevId: 210974939
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instructions.cc')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instructions.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instructions.cc b/tensorflow/compiler/xla/service/hlo_instructions.cc
index 0b7f741d73..e1c884d856 100644
--- a/tensorflow/compiler/xla/service/hlo_instructions.cc
+++ b/tensorflow/compiler/xla/service/hlo_instructions.cc
@@ -337,11 +337,10 @@ bool HloCollectiveInstruction::IdenticalSlowPath(
/*eq_computations*/) const {
const auto& casted_other =
static_cast<const HloCollectiveInstruction&>(other);
- return ContainersEqual(replica_groups(), casted_other.replica_groups(),
- [](const ReplicaGroup& a, const ReplicaGroup& b) {
- return ContainersEqual(a.replica_ids(),
- b.replica_ids());
- });
+ return absl::c_equal(replica_groups(), casted_other.replica_groups(),
+ [](const ReplicaGroup& a, const ReplicaGroup& b) {
+ return absl::c_equal(a.replica_ids(), b.replica_ids());
+ });
}
HloAllReduceInstruction::HloAllReduceInstruction(
@@ -452,11 +451,10 @@ bool HloCollectivePermuteInstruction::IdenticalSlowPath(
/*eq_computations*/) const {
const auto& casted_other =
static_cast<const HloCollectivePermuteInstruction&>(other);
- return ContainersEqual(
- source_target_pairs(), casted_other.source_target_pairs(),
- [](const std::pair<int64, int64>& a, const std::pair<int64, int64>& b) {
- return a == b;
- });
+ return absl::c_equal(source_target_pairs(),
+ casted_other.source_target_pairs(),
+ [](const std::pair<int64, int64>& a,
+ const std::pair<int64, int64>& b) { return a == b; });
}
std::unique_ptr<HloInstruction>