aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/lib
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-04-14 16:22:57 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-14 17:50:59 -0700
commite5c6d7c929b4e0c90c397075ead6dd559abd52fd (patch)
tree8eacd55fc188290df808ca59f4fff1a3b5226ab8 /tensorflow/stream_executor/lib
parent2e89e03db00adda31bfba1c659fb15382f43b2b9 (diff)
Output the error message when stream_executor's ValueOrDie, ConsumeValueOrDie, or SE_CHECK_OK fail.
Change: 153225083
Diffstat (limited to 'tensorflow/stream_executor/lib')
-rw-r--r--tensorflow/stream_executor/lib/status.h3
-rw-r--r--tensorflow/stream_executor/lib/statusor.h4
2 files changed, 3 insertions, 4 deletions
diff --git a/tensorflow/stream_executor/lib/status.h b/tensorflow/stream_executor/lib/status.h
index 0aec2917dc..8c289e1927 100644
--- a/tensorflow/stream_executor/lib/status.h
+++ b/tensorflow/stream_executor/lib/status.h
@@ -29,8 +29,7 @@ namespace port {
using Status = tensorflow::Status;
-#define SE_CHECK_OK(val) \
- CHECK_EQ(::perftools::gputools::port::Status::OK(), (val))
+#define SE_CHECK_OK(val) TF_CHECK_OK(val)
#define SE_ASSERT_OK(val) \
ASSERT_EQ(::perftools::gputools::port::Status::OK(), (val))
diff --git a/tensorflow/stream_executor/lib/statusor.h b/tensorflow/stream_executor/lib/statusor.h
index 2a6df910ab..06278d5152 100644
--- a/tensorflow/stream_executor/lib/statusor.h
+++ b/tensorflow/stream_executor/lib/statusor.h
@@ -202,13 +202,13 @@ StatusOr<T>::StatusOr(const T& value)
template <typename T>
const T& StatusOr<T>::ValueOrDie() const {
- assert(status_.ok());
+ TF_CHECK_OK(status_);
return value_;
}
template <typename T>
T StatusOr<T>::ConsumeValueOrDie() {
- assert(status_.ok());
+ TF_CHECK_OK(status_);
return std::move(value_);
}