message: add a run function eager defun_matmul benchmark
diff: @@ -519,7 +519,7 @@ class MicroBenchmarks(benchmarks_test_base.MicroBenchmarksBase):
  transpose_b,
  num_iters,
  execution_mode=None):
  - f = function.defun(math_ops.matmul)
  + f = def_function.function(math_ops.matmul)
  def func():
  with backprop.GradientTape() as gt:
  @@ -620,14 +620,18 @@ class MicroBenchmarks(benchmarks_test_base.MicroBenchmarksBase):
  num_iters=self._num_iters_2_by_2,
  execution_mode=context.ASYNC)
  - def benchmark_defun_matmul_forward_backward_2_by_2_CPU(self):
  + def _benchmark_matmul_forward_backward_2_by_2_CPU(self, run_eager=False):
  + def_function.run_functions_eagerly(run_eager)
  with context.device(CPU):
  m = self._m_2_by_2.cpu()
  self._benchmark_defun_matmul_forward_backward(
  m, transpose_b=False, num_iters=self._num_iters_2_by_2)
  + def_function.run_functions_eagerly(False)
  @test_util.disable_tfrt("async not supported")
  - def benchmark_defun_matmul_forward_backward_2_by_2_CPU_async(self):
  + def _benchmark_matmul_forward_backward_2_by_2_CPU_async(
  + self, run_eager=False):
  + def_function.run_functions_eagerly(run_eager)
  with context.device(CPU):
  m = self._m_2_by_2.cpu()
  self._benchmark_defun_matmul_forward_backward(
  @@ -636,6 +640,20 @@ class MicroBenchmarks(benchmarks_test_base.MicroBenchmarksBase):
  num_iters=self._num_iters_2_by_2,
  execution_mode=context.ASYNC)
  + def benchmark_defun_matmul_forward_backward_2_by_2_CPU(self):
  + self._benchmark_matmul_forward_backward_2_by_2_CPU(False)
  +
  + @test_util.disable_tfrt("async not supported")
  + def benchmark_defun_matmul_forward_backward_2_by_2_CPU_async(self):
  + self._benchmark_matmul_forward_backward_2_by_2_CPU_async(False)
  +
  + def benchmark_defun_eager_matmul_forward_backward_2_by_2_CPU(self):
  + self._benchmark_matmul_forward_backward_2_by_2_CPU(True)
  +
  + @test_util.disable_tfrt("async not supported")
  + def benchmark_defun_eager_matmul_forward_backward_2_by_2_CPU_async(self):
  + self._benchmark_matmul_forward_backward_2_by_2_CPU_async(True)
  +
  def benchmark_tf_matmul_2_by_2_GPU(self):
  if not context.num_gpus():
  return
  