diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-12 10:50:42 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-12 10:55:40 -0700 |
commit | f8044c89287b1d90510ceace4b53ec94abaffa50 (patch) | |
tree | b88d7d1c4a4845588971c774ba94a3b9297fead9 /tensorflow/stream_executor/stream.cc | |
parent | c634fe54b7e270ccf08331c15e98c76ef5810b61 (diff) |
Automated rollback of commit 0ea6847c892497afdd20c1150fee1e532612ca17
PiperOrigin-RevId: 204326206
Diffstat (limited to 'tensorflow/stream_executor/stream.cc')
-rw-r--r-- | tensorflow/stream_executor/stream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc index 9369183133..b3ed7e4452 100644 --- a/tensorflow/stream_executor/stream.cc +++ b/tensorflow/stream_executor/stream.cc @@ -268,6 +268,12 @@ Stream::~Stream() { VLOG_CALL(); temporary_memory_manager_.ForceDeallocateAll(); + // Ensure the stream is completed. + auto status = BlockHostUntilDone(); + if (!status.ok()) { + LOG(WARNING) << "Error blocking host until done in stream destructor: " + << status; + } if (allocated_) { parent_->DeallocateStream(this); |