aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/shape_layout.cc
diff options
context:
space:
mode:
authorGravatar Justin Lebar <jlebar@google.com>2018-08-27 14:50:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-27 14:55:29 -0700
commitd57f5a82025702d573d478091dc9c385adf53c09 (patch)
treee0a9f6b00cd6846cf71a79e02779e1e1f1f9cfc5 /tensorflow/compiler/xla/shape_layout.cc
parent91f33732cb15f51eaf6ec86c82e42a74e351e061 (diff)
[XLA] Switch to absl::StrFormat.
Unlike Printf, StrFormat does not require type-length qualifiers, e.g %z, %ll. Nor does it require that you call c_str() to print strings. So these are fixed up here as well. PiperOrigin-RevId: 210435915
Diffstat (limited to 'tensorflow/compiler/xla/shape_layout.cc')
-rw-r--r--tensorflow/compiler/xla/shape_layout.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/shape_layout.cc b/tensorflow/compiler/xla/shape_layout.cc
index caad31d6ce..d44db89d57 100644
--- a/tensorflow/compiler/xla/shape_layout.cc
+++ b/tensorflow/compiler/xla/shape_layout.cc
@@ -25,8 +25,8 @@ namespace xla {
Status ShapeLayout::CopyLayoutFromShape(const Shape& other_shape) {
if (!ShapeUtil::Compatible(other_shape, shape_)) {
return InvalidArgument("Shape %s is not compatible with shape %s",
- ShapeUtil::HumanString(other_shape).c_str(),
- ShapeUtil::HumanString(shape()).c_str());
+ ShapeUtil::HumanString(other_shape),
+ ShapeUtil::HumanString(shape()));
}
shape_ = other_shape;
return Status::OK();
@@ -35,8 +35,8 @@ Status ShapeLayout::CopyLayoutFromShape(const Shape& other_shape) {
Status ShapeLayout::AssignLayoutToShape(Shape* to_shape) const {
if (!ShapeUtil::Compatible(*to_shape, shape_)) {
return InvalidArgument("Shape %s is not compatible with shape %s",
- ShapeUtil::HumanString(*to_shape).c_str(),
- ShapeUtil::HumanString(shape()).c_str());
+ ShapeUtil::HumanString(*to_shape),
+ ShapeUtil::HumanString(shape()));
}
*to_shape = shape_;
return Status::OK();