aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Blake Hechtman <blakehechtman@google.com>2017-02-28 16:32:28 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-02-28 17:00:31 -0800
commit676f94a952df76d36a134a5e3b92285fabb72cc8 (patch)
treede7d8d85ce6ec156661bec00e40e543af8df9832
parent1296e563c986280059b2da666540997e49fcfe9a (diff)
Fixes XLA open source build.
Change: 148831489
-rw-r--r--tensorflow/compiler/xla/service/algebraic_simplifier.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/algebraic_simplifier.cc b/tensorflow/compiler/xla/service/algebraic_simplifier.cc
index efbfda4d3f..e225c4e927 100644
--- a/tensorflow/compiler/xla/service/algebraic_simplifier.cc
+++ b/tensorflow/compiler/xla/service/algebraic_simplifier.cc
@@ -757,21 +757,23 @@ StatusOr<bool> AlgebraicSimplifierVisitor::
new_user_operands[reshape_or_broadcast_operand_index] = operand;
auto new_user = computation_->AddInstruction(user->CloneWithNewOperands(
ShapeUtil::MakeShape(user->shape().element_type(),
- operand->shape().dimensions()),
+ AsInt64Slice(operand->shape().dimensions())),
new_user_operands));
HloInstruction* new_reshape_or_broadcast = nullptr;
if (reshape_or_broadcast->opcode() == HloOpcode::kReshape) {
new_reshape_or_broadcast =
computation_->AddInstruction(HloInstruction::CreateReshape(
- ShapeUtil::MakeShape(user->shape().element_type(),
- reshape_or_broadcast->shape().dimensions()),
+ ShapeUtil::MakeShape(
+ user->shape().element_type(),
+ AsInt64Slice(reshape_or_broadcast->shape().dimensions())),
new_user));
} else {
TF_RET_CHECK(reshape_or_broadcast->opcode() == HloOpcode::kBroadcast);
new_reshape_or_broadcast =
computation_->AddInstruction(HloInstruction::CreateBroadcast(
- ShapeUtil::MakeShape(user->shape().element_type(),
- reshape_or_broadcast->shape().dimensions()),
+ ShapeUtil::MakeShape(
+ user->shape().element_type(),
+ AsInt64Slice(reshape_or_broadcast->shape().dimensions())),
new_user, reshape_or_broadcast->dimensions()));
}
TF_RETURN_IF_ERROR(