diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-12-06 20:13:31 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-12-06 20:17:13 -0800 |
commit | 64c4e8f6c1f2676fbd79b9a88a634424176d7101 (patch) | |
tree | 048eb276561dae45bcdd25ca1f61312dd87f78ca /tensorflow/stream_executor/stream_executor_pimpl.h | |
parent | f75481874fb7314c907b1770ea04c851b9ec07d4 (diff) |
Add BlockHostUntilDoneWithStatus, which returns Status rather than bool.
Also fixed a deadlock in Stream::BlockHostUntilDone. The problem with the
original code was that it grabbed mu_ before looping over substreams, and would
call CheckError with mu_ still held. But CheckError will attempt to lock mu_ in
the failure case, which would deadlock.
PiperOrigin-RevId: 178191634
Diffstat (limited to 'tensorflow/stream_executor/stream_executor_pimpl.h')
-rw-r--r-- | tensorflow/stream_executor/stream_executor_pimpl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/stream_executor_pimpl.h b/tensorflow/stream_executor/stream_executor_pimpl.h index 66c50d47e9..d2965dbfd7 100644 --- a/tensorflow/stream_executor/stream_executor_pimpl.h +++ b/tensorflow/stream_executor/stream_executor_pimpl.h @@ -481,7 +481,7 @@ class StreamExecutor { // Causes the host code to synchronously wait for operations entrained onto // stream to complete. Effectively a join on the asynchronous device // operations enqueued on the stream before this program point. - bool BlockHostUntilDone(Stream *stream); + port::Status BlockHostUntilDoneWithStatus(Stream *stream); // Synchronously allocates size bytes on the underlying platform and returns // an opaque void* representing that allocation. In the case of failure, |