Commit 39f00d9d authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.data] Remove unnecessary BackgroundWorker from MultiDeviceIteratorGetNextFromShardOp.

The underlying MultiDeviceIterator::GetNextFromShard() method is non-blocking, so we can call it directly from the inter-op threadpool thread. This can save O(num_devices * num_iterators) threads from each process that uses a MultiDeviceIterator, and would prevent unnecessary serialization in the case that the GetNextFromShard op is shared between multiple callers (e.g. under Eager mode's kernel cache).

PiperOrigin-RevId: 236649650
parent 11d6b4bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment