def METHOD_NAME(benchmark_spec):
  """Runs the Stencil2D benchmark. GPU clock speeds must be set already.
  Args:
    benchmark_spec: The benchmark specification. Contains all data that is
        required to run the benchmark.
  Returns:
    A list of sample.Sample objects.
  """
  vms = benchmark_spec.vms
  num_gpus = benchmark_spec.num_gpus
  master_vm = vms[0]
  num_iterations = FLAGS.stencil2d_iterations
  problem_sizes = FLAGS.stencil2d_problem_sizes
  num_processes = len(vms) * num_gpus
  metadata = {}
  metadata.update(cuda_toolkit.GetMetadata(master_vm))
  metadata['benchmark_version'] = BENCHMARK_VERSION
  metadata['num_iterations'] = num_iterations
  metadata['num_nodes'] = len(vms)
  metadata['num_processes'] = num_processes
  results = []
  for problem_size in problem_sizes:
    results.extend(
        _RunSingleIteration(master_vm, problem_size, num_processes,
                            num_iterations, metadata))
  return results