[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
Loading
Please sign in to comment