aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/shape_inference.cc
diff options
context:
space:
mode:
authorGravatar Tim Shen <timshen@google.com>2018-08-30 11:20:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-30 11:29:03 -0700
commit09f2c342c0e74834bebf8045d5e77dcef8323539 (patch)
tree3a969695f54840366629df7f39e4da7f9ac103cd /tensorflow/compiler/xla/service/shape_inference.cc
parent9e12f1df3270b5e0b310645e6c3cae9fbd3f5dfc (diff)
Remove (Mutable)ArraySlice implementation and alias them to absl::Span.
There are several API migrations happening: * ArraySlice's sub-slice constructor => .subspan * MutableArraySlice's container pointer constructor => absl::MakeSpan PiperOrigin-RevId: 210946124
Diffstat (limited to 'tensorflow/compiler/xla/service/shape_inference.cc')
-rw-r--r--tensorflow/compiler/xla/service/shape_inference.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/shape_inference.cc b/tensorflow/compiler/xla/service/shape_inference.cc
index f5217c5a11..45427bba25 100644
--- a/tensorflow/compiler/xla/service/shape_inference.cc
+++ b/tensorflow/compiler/xla/service/shape_inference.cc
@@ -1872,8 +1872,7 @@ ShapeInference::InferDegenerateDimensionBroadcastShape(HloOpcode operation,
}
int64 num_reduced_args = arg_shapes.size() / 2;
- tensorflow::gtl::ArraySlice<const Shape*> reduced_args(arg_shapes, 0,
- num_reduced_args);
+ auto reduced_args = arg_shapes.subspan(0, num_reduced_args);
// Check that all of the reduced tensors have the same dimensions. The element
// types may be different.
for (int64 i = 1; i < num_reduced_args; ++i) {
@@ -1897,8 +1896,7 @@ ShapeInference::InferDegenerateDimensionBroadcastShape(HloOpcode operation,
}
}
- tensorflow::gtl::ArraySlice<const Shape*> init_values(
- arg_shapes, num_reduced_args, arg_shapes.size());
+ auto init_values = arg_shapes.subspan(num_reduced_args, arg_shapes.size());
std::vector<PrimitiveType> element_types;
for (const Shape* arg : reduced_args) {
element_types.push_back(arg->element_type());