diff --git a/tensorflow/python/eager/benchmarks_test.py b/tensorflow/python/eager/benchmarks_test.py index 72eaa663c6c..5d57f1d9b93 100644 --- a/tensorflow/python/eager/benchmarks_test.py +++ b/tensorflow/python/eager/benchmarks_test.py @@ -1231,6 +1231,14 @@ class MicroBenchmarks(benchmarks_test_base.MicroBenchmarksBase): self._run(fn, 10000) + def benchmark_convert_tensor(self): + value = ops.convert_to_tensor(42) + + def fn(): + return ops.convert_to_tensor(value) + + self._run(fn, 10000) + def _benchmark_convert_constant(self, value, cached): global GLOBAL_TEST_VALUE GLOBAL_TEST_VALUE = value