contrib/eagerpython/datasets: Resource naming workaround.
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.
Loading
Please sign in to comment