aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream.h
diff options
context:
space:
mode:
authorGravatar Todd Wang <toddw@google.com>2018-07-25 23:53:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-25 23:57:12 -0700
commit33879661ed221167f3987bcc2fdc5298986d29fb (patch)
tree5c33753b812221f3685419a1c211b345030cefbb /tensorflow/stream_executor/stream.h
parentfae3a601193c9a9e565e0a3a2b82e9e849abe49d (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.h2
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