aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/literal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/compiler/xla/literal.cc')
-rw-r--r--tensorflow/compiler/xla/literal.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/literal.cc b/tensorflow/compiler/xla/literal.cc
index 177f39cc74..656ce720a1 100644
--- a/tensorflow/compiler/xla/literal.cc
+++ b/tensorflow/compiler/xla/literal.cc
@@ -1945,11 +1945,11 @@ Status LiteralBase::Piece::CopyFromProto(const LiteralProto& proto) {
}
} break;
case TUPLE:
- LOG(FATAL) << "Should not be called on tuple shapes: "
- << ShapeUtil::HumanString(subshape());
- break;
+ return InvalidArgument("Should not be called on tuple shapes: %s",
+ ShapeUtil::HumanString(subshape()));
default:
- LOG(FATAL) << "Unhandled primitive type " << subshape().element_type();
+ return InvalidArgument("Is called on unsupported shape: %s",
+ ShapeUtil::HumanString(subshape()));
}
return Status::OK();
}