Skip to content

contrib/eagerpython/datasets: Resource naming workaround.#19786

Merged
av8ramit merged 1 commit intotensorflow:masterfrom
asimshankar:anon-iter
Jun 5, 2018
Merged

contrib/eagerpython/datasets: Resource naming workaround.#19786
av8ramit merged 1 commit intotensorflow:masterfrom
asimshankar:anon-iter

Conversation

@asimshankar
Copy link
Copy Markdown
Contributor

tensorflow/contrib/eager/python/datasets_test.py was failing on GPU
because two tests - testTensorsPlacedOnDevice() and
testTensorsExplicitPrefetchToDevice() we're creating
FunctionBufferResources with the same shared_name, leading to
unintentional interference.

This change will make the tests pass and allow the use of
tf.contrib.eager.Iterator and
tf.data.Dataset.apply(prefetching_ops.prefetch_to_device)
in the same process without interference.

However, a more appropriate fix would probably be to use
anonymous function buffering resources (similar to
AnonymousIteratorHandle) when eager execution is enabled,
doing away with sharing by name.

CC @allenlavoie @rohan100jain @mrry @av8ramit

tensorflow/contrib/eager/python/datasets_test.py was failing on GPU
because two tests - testTensorsPlacedOnDevice() and
testTensorsExplicitPrefetchToDevice() we're creating
FunctionBufferResources with the same shared_name, leading to
unintentional interference.

This change will make the tests pass and allow the use of
tf.contrib.eager.Iterator and
tf.data.Dataset.apply(prefetching_ops.prefetch_to_device)
in the same process without interference.

However, a more appropriate fix would probably be to use
anonymous function buffering resources (similar to
AnonymousIteratorHandle) when eager execution is enabled,
doing away with sharing by name.
@av8ramit av8ramit merged commit 1056894 into tensorflow:master Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants