aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yunxing Dai <yunxing@google.com>2018-05-14 18:55:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-14 18:58:15 -0700
commitde924ae2580bac22b142a82b576e5cda8c653d42 (patch)
tree58b9e96358c8d1ccb731fc80612f01fc3e60969a
parent82cea6c11f8e3368f6b22a8833e958ccf38493b9 (diff)
Fix a bug in HloInstruction::ImplicitlyBroadcastsOperand where operands with the same dimension but different types are not considered broadcast.
PiperOrigin-RevId: 196603348
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction.cc b/tensorflow/compiler/xla/service/hlo_instruction.cc
index a269034be3..31aff008a4 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction.cc
+++ b/tensorflow/compiler/xla/service/hlo_instruction.cc
@@ -3133,7 +3133,7 @@ bool HloInstruction::IsElementwise() const {
bool HloInstruction::ImplicitlyBroadcastsOperand(int64 operand_idx) const {
CHECK(IsElementwise());
- return !ShapeUtil::Equal(shape(), operand(operand_idx)->shape());
+ return !ShapeUtil::SameDimensions(shape(), operand(operand_idx)->shape());
}
namespace {