class_docstr: Benchmarks for autotuning performance knobs.
class_docstr_tok: ["Benchmarks","for","autotuning","performance","knobs","."]
code: def _benchmark_map_batch_and_interleave(self, autotune, benchmark_id):
      batch_size = 16
      k = 1024 * 1024
      a = (np.random.rand(1, 8 * k), np.random.rand(8 * k, 1))
      b = (np.random.rand(1, 4 * k), np.random.rand(4 * k, 1))
      c = (np.random.rand(1, 2 * k), np.random.rand(2 * k, 1))
      dataset_a = dataset_ops.Dataset.from_tensors(a).repeat()
      dataset_b = dataset_ops.Dataset.from_tensors(b).repeat()
      dataset_c = dataset_ops.Dataset.from_tensors(c).repeat()
  
      dataset = dataset_a
      dataset = dataset.map(
          math_ops.matmul, num_parallel_calls=dataset_ops.AUTOTUNE
      )
      dataset = dataset.batch(batch_size=batch_size)
      dataset = (
          dataset_ops.Dataset.range(1)
          .repeat()
          .interleave(
              lambda _: dataset,
              num_parallel_calls=dataset_ops.AUTOTUNE,
              cycle_length=2,
          )
      )
  
      dataset = dataset_ops.Dataset.zip((dataset, dataset_b))
      dataset = (
          dataset_ops.Dataset.range(1)
          .repeat()
          .interleave(
              lambda _: dataset,
              num_parallel_calls=dataset_ops.AUTOTUNE,
              cycle_length=2,
          )
      )
  
      dataset_c = dataset_c.map(
          math_ops.matmul, num_parallel_calls=dataset_ops.AUTOTUNE
      )
      dataset_c = dataset_c.batch(batch_size=batch_size)
      dataset = dataset_ops.Dataset.zip((dataset, dataset_c))
      return self._run_benchmark(
          dataset=dataset,
          autotune=autotune,
          benchmark_iters=1000,
          benchmark_label="map_and_batch_and_interleave",
          benchmark_id=benchmark_id,
      )
  
file_path: tensorflow/tensorflow/python/data/experimental/benchmarks/autotune_benchmark.py
imports: import numpy
  from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import options
  from tensorflow.python.ops import math_ops
label_desc: Use image node_id 13 for calling the AutotuneBenchmark obj's underlying member method code with example usage: obj._benchmark_map_batch_and_interleave(autotune, benchmark_id) and returns: self