aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/stream_pool_test.cc
Commit message (Collapse)AuthorAge
* Internal change.Gravatar A. Unique TensorFlower2018-09-20
| | | | PiperOrigin-RevId: 213770000
* Replace generic Pool with StreamPool, and discard failed streams.Gravatar Todd Wang2018-07-25
We have a Pool in XLA that maintains a freelist of Streams, to avoid the overhead of repeatedly allocating new Streams. Streams have a monotonic state machine; if a stream encounters any error, it will remain in an error state forever. The functional change in this CL is to ensure that streams which have encountered an error are deleted, rather than being put back on the pool. Without this change, a previously failed stream will be put back on the pool, only to cause the next usage of the stream to trivially fail. I've chosen to replace the generic templatized Pool with a concrete StreamPool, since this makes the logic more straightforward to reason about. Also note that the only existing usage of Pool is to hold streams. The functional change is in stream_pool.cc; most of everything else is mechanical updates. PiperOrigin-RevId: 206100631