diff options
author | 2017-12-14 11:08:00 -0800 | |
---|---|---|
committer | 2017-12-14 11:11:26 -0800 | |
commit | 3d854a744d1236944eb0ecdc172b1825ace565e1 (patch) | |
tree | 7db547f95000448a19a88b61774be14543bb16fc /tensorflow/python/platform | |
parent | 0761849e0a3327f1e3499910ad8af8e6ed712f26 (diff) |
[tf.data] Reimplement `tf.contrib.data.get_single_element()` as an async op.
The current `ToSingleElementOp` kernel has a synchronous
implementation, and yet it can block an inter-op threadpool thread (in
`iterator->GetNext()`) while depending on another (e.g. if the
iterator calls a TensorFlow function to produce an element). This can
lead to deadlock if the number of inter-op threadpool threads is less
than or equal to the number of concurrent activations of that
kernel. This change fixes that deadlock by moving the blocking
computation onto a background thread.
PiperOrigin-RevId: 179067816
Diffstat (limited to 'tensorflow/python/platform')
0 files changed, 0 insertions, 0 deletions