aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/hlo_instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction.h')
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction.h b/tensorflow/compiler/xla/service/hlo_instruction.h
index 1762d227be..c4fe132d1d 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction.h
+++ b/tensorflow/compiler/xla/service/hlo_instruction.h
@@ -589,12 +589,9 @@ class HloInstruction {
if (opcode() != other.opcode()) {
return false;
}
- auto eq_shapes = layout_sensitive
- ? [](const Shape& a,
- const Shape& b) { return ShapeUtil::Equal(a, b); }
- : [](const Shape& a, const Shape& b) {
- return ShapeUtil::Compatible(a, b);
- };
+ using EqShapeFuncType = bool (*)(const Shape&, const Shape&);
+ EqShapeFuncType eq_shapes =
+ layout_sensitive ? ShapeUtil::Equal : ShapeUtil::Compatible;
if (!eq_shapes(shape(), other.shape())) {
return false;
}