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

[tf.data] Add benchmarks for variants of slice/batch/repeat pipelines.

These pipelines are typically very simple, and magnify the effect of
TensorFlow and `tf.data` overheads. Tracking them continuously will
help to evaluate performance improvements, with a view to addressing
issue #15694.

Representative measurements from my workstation:

tensorflow/python/data/kernel_tests/dataset_constructor_op_test.py:

* Dataset.from_tensor_slices().repeat().batch() with Session.run(): 155 ms/element
* Dataset.from_tensor_slices().repeat().batch() with Session.make_callable(): 91 ms/element
* Dataset.from_tensor_slices(numpy.reshape(.)).repeat() with Session.make_callable(): 44 ms/element
* Dataset.from_tensor_slices().batch().cache().repeat() with Session.make_callable(): 43 ms/element

tensorflow/contrib/eager/python/datasets_test.py:

* Dataset.from_tensor_slices().repeat().batch() with tfe.Iterator(): 102 ms/element
* Dataset.from_tensor_slices().batch().cache().repeat() with tfe.Iterator(): 53 ms/element

PiperOrigin-RevId: 180853890
parent 9fa14867
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment