diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-30 09:36:26 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-30 09:39:37 -0700 |
commit | 018014bbdb87e5c0577234293816888bb0d93c00 (patch) | |
tree | 68fd88ff7162f1f0116416c0e1304d75021f03dd /tensorflow/stream_executor | |
parent | bae59bf4e55fbbe89a668b3809fa3183e281e2b9 (diff) |
[SE] Ensure we BlockHostUntilDone before we deallocate temporary memory
PiperOrigin-RevId: 206595861
Diffstat (limited to 'tensorflow/stream_executor')
-rw-r--r-- | tensorflow/stream_executor/stream.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc index 6248aa2d01..b0c061fd74 100644 --- a/tensorflow/stream_executor/stream.cc +++ b/tensorflow/stream_executor/stream.cc @@ -267,13 +267,13 @@ Stream::Stream(StreamExecutor *parent, 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; } + temporary_memory_manager_.ForceDeallocateAll(); if (allocated_) { parent_->DeallocateStream(this); |