diff options
author | 2018-07-25 23:53:16 -0700 | |
---|---|---|
committer | 2018-07-25 23:57:12 -0700 | |
commit | 33879661ed221167f3987bcc2fdc5298986d29fb (patch) | |
tree | 5c33753b812221f3685419a1c211b345030cefbb /tensorflow/stream_executor/stream.h | |
parent | fae3a601193c9a9e565e0a3a2b82e9e849abe49d (diff) |
Ensure failed sub-streams are not re-used.
Streams have a monotonic state machine; if a stream encounters any
error, it will remain in an error state forever. Without this change,
a previously failed sub-stream will be put back on sub_streams_, only
to cause the next usage of the sub-stream to trivially fail.
PiperOrigin-RevId: 206112024
Diffstat (limited to 'tensorflow/stream_executor/stream.h')
-rw-r--r-- | tensorflow/stream_executor/stream.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/stream_executor/stream.h b/tensorflow/stream_executor/stream.h index 63d64947c8..706442a666 100644 --- a/tensorflow/stream_executor/stream.h +++ b/tensorflow/stream_executor/stream.h @@ -125,7 +125,7 @@ class Stream { Stream *GetOrCreateSubStream() LOCKS_EXCLUDED(mu_); // Return the sub-stream back to the host stream so that it can be reused - // later. + // later. Sub-streams that are !ok() will not be reused. void ReturnSubStream(Stream *sub_stream) LOCKS_EXCLUDED(mu_); // Allocate temporary memories. The stream will deallocate them when blocked |