code: def benchmark_loop(setup):
      result = np.zeros((REPEAT, len(SIZES), 2), dtype=np.float64)
      for s, n in enumerate(SIZES):
          nnc, aten = setup(n)
          nnc = maybe_synced(nnc)
          aten = maybe_synced(aten)
  
          for r in range(result.shape[0]):
              result[r, s, 0] = timeit.timeit(nnc, number=NUMBER[s])
              result[r, s, 1] = timeit.timeit(aten, number=NUMBER[s])
  
      result = np.median(result, axis=0)
      assert result.shape == (len(SIZES), 2)
      result = result[:, 1] / result[:, 0]
      print(result)
      return result
  
file_path: pytorch/functorch/benchmarks/operator_authoring.py
imports: import timeit
  from functools import partial
  import numpy
  import pandas
  import torch
  from functorch.compile import pointwise_operator
label_desc: Use image node_id 6 for calling a global function with example usage: benchmark_loop(setup) and returns: result