aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow')
-rw-r--r--tensorflow/compiler/tf2xla/kernels/gather_op.cc12
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));