diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-04-14 16:22:57 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-14 17:50:59 -0700 |
commit | e5c6d7c929b4e0c90c397075ead6dd559abd52fd (patch) | |
tree | 8eacd55fc188290df808ca59f4fff1a3b5226ab8 /tensorflow/stream_executor/lib | |
parent | 2e89e03db00adda31bfba1c659fb15382f43b2b9 (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.h | 3 | ||||
-rw-r--r-- | tensorflow/stream_executor/lib/statusor.h | 4 |
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_); } |