diff options
author | Justin Lebar <jlebar@google.com> | 2017-11-06 17:28:28 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-11-06 17:32:24 -0800 |
commit | 54798e7a86e06badc3eb05d26799e2827f9c98f4 (patch) | |
tree | e8d3485ad5ef23577f92dd85c95970701d055fb1 /tensorflow/compiler | |
parent | 99c790697a3c399a3a89d23043cf6678de450e20 (diff) |
Automated g4 rollback of changelist 174523638
PiperOrigin-RevId: 174788331
Diffstat (limited to 'tensorflow/compiler')
-rw-r--r-- | tensorflow/compiler/tf2xla/kernels/gather_op.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/tensorflow/compiler/tf2xla/kernels/gather_op.cc b/tensorflow/compiler/tf2xla/kernels/gather_op.cc index 2c5d910d58..e420f21ca3 100644 --- a/tensorflow/compiler/tf2xla/kernels/gather_op.cc +++ b/tensorflow/compiler/tf2xla/kernels/gather_op.cc @@ -77,18 +77,6 @@ xla::ComputationDataHandle XlaComputeGatherDynamicSlice( out_shape.dim_sizes()); } - // Degenerate case: single slice. - if (num_indices == 1) { - auto index = builder->Reshape(indices, {1}); - auto start_index = builder->Pad( - index, XlaHelpers::Zero(builder, index_type), - xla::MakeEdgePaddingConfig( - {{input_shape_pre_axis.dims(), input_shape_post_axis.dims()}})); - auto slice = - builder->DynamicSlice(input, start_index, slice_shape.dim_sizes()); - return builder->Reshape(slice, out_shape.dim_sizes()); - } - // Specify the shape of the loop-carried Tensor tuple. xla::PrimitiveType ptype; TF_CHECK_OK(DataTypeToPrimitiveType(dtype, &ptype)); |