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_internal.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_internal.h')
-rw-r--r-- | tensorflow/stream_executor/stream_executor_internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/stream_executor/stream_executor_internal.h b/tensorflow/stream_executor/stream_executor_internal.h index 14445a7657..d2426f46e2 100644 --- a/tensorflow/stream_executor/stream_executor_internal.h +++ b/tensorflow/stream_executor/stream_executor_internal.h @@ -220,6 +220,7 @@ class StreamExecutorInterface { virtual bool StartTimer(Stream *stream, Timer *timer) = 0; virtual bool StopTimer(Stream *stream, Timer *timer) = 0; virtual bool BlockHostUntilDone(Stream *stream) = 0; + virtual port::Status BlockHostUntilDoneWithStatus(Stream *stream); virtual int PlatformDeviceCount() = 0; virtual port::Status EnablePeerAccessTo(StreamExecutorInterface *other) = 0; virtual bool CanEnablePeerAccessTo(StreamExecutorInterface *other) = 0; |