diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-24 13:50:22 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-24 13:55:16 -0700 |
commit | ee0bd6ef450b388fadea63b31b65b13bd12f17d6 (patch) | |
tree | a7575f0449f0235a8cf9a05a3207f6f60990e943 /tensorflow/stream_executor/stream.cc | |
parent | 6b2ae9b3da572d2f8e1eccdf2922efce43cbecd4 (diff) |
Automated rollback of commit 0ea6847c892497afdd20c1150fee1e532612ca17
PiperOrigin-RevId: 205885304
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 ca1b8e28e6..2c495c99e1 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); |