diff options
Diffstat (limited to 'tensorflow/stream_executor/stream.cc')
-rw-r--r-- | tensorflow/stream_executor/stream.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc index 3695c839b5..19d3b2389a 100644 --- a/tensorflow/stream_executor/stream.cc +++ b/tensorflow/stream_executor/stream.cc @@ -5287,12 +5287,11 @@ Stream &Stream::ThenTransformTensor(const dnn::BatchDescriptor &input_desc, Stream &Stream::ThenDoHostCallback(std::function<void()> callback) { VLOG_CALL(PARAM(callback)); - if (ok()) { - CheckError(parent_->HostCallback(this, callback)); - } else { + if (!ok()) { LOG(INFO) << DebugStreamPointers() << " was in error state before adding host callback"; } + CheckError(parent_->HostCallback(this, std::move(callback))); return *this; } @@ -5300,12 +5299,11 @@ Stream &Stream::ThenDoHostCallbackWithStatus( std::function<port::Status()> callback) { VLOG_CALL(PARAM(callback)); - if (ok()) { - CheckError(parent_->HostCallback(this, std::move(callback))); - } else { - LOG(WARNING) << "stream " << DebugStreamPointers() - << " was in error state before adding host callback"; + if (!ok()) { + LOG(INFO) << DebugStreamPointers() + << " was in error state before adding host callback"; } + CheckError(parent_->HostCallback(this, std::move(callback))); return *this; } |