aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/stream_executor/stream.cc')
-rw-r--r--tensorflow/stream_executor/stream.cc19
1 files changed, 3 insertions, 16 deletions
diff --git a/tensorflow/stream_executor/stream.cc b/tensorflow/stream_executor/stream.cc
index 0cd0790a72..9369183133 100644
--- a/tensorflow/stream_executor/stream.cc
+++ b/tensorflow/stream_executor/stream.cc
@@ -5228,24 +5228,11 @@ port::Status Stream::BlockHostUntilDone() {
return status;
}
- port::Status first_error;
- {
- // Wait until all active sub-streams have done their tasks.
- mutex_lock lock(mu_);
- for (auto &stream : sub_streams_) {
- if (!stream.second) {
- first_error.Update(stream.first->BlockHostUntilDone());
- // Set this sub-stream as available.
- stream.second = true;
- }
- }
- }
-
temporary_memory_manager_.DeallocateFinalizedTemporaries();
- first_error.Update(parent_->BlockHostUntilDone(this));
- CheckError(first_error.ok());
- return first_error;
+ port::Status error = parent_->BlockHostUntilDone(this);
+ CheckError(error.ok());
+ return error;
}
} // namespace stream_executor