class_docstr: Some common benchmarks that help understand perf bottleneck of a standard dataloader
  made of dataset, mapper and sampler.
class_docstr_tok: ["Some","common","benchmarks","that","help","understand","perf","bottleneck","of","a","standard","dataloader","made","of","dataset",",","mapper","and","sampler","."]
docstr: Benchmark the dataloader where each worker outputs nothing. This
  eliminates the IPC overhead compared to the regular dataloader.
  
  PyTorch multiprocessing's IPC only optimizes for torch tensors.
  Large numpy arrays or other data structure may incur large IPC overhead.
docstr_tok: ["Benchmark","the","dataloader","where","each","worker","outputs","nothing",".","This","eliminates","the","IPC","overhead","compared","to","the","regular","dataloader",".","PyTorch","multiprocessing","'s","IPC","only","optimizes","for","torch","tensors",".","Large","numpy","arrays","or","other","data","structure","may","incur","large","IPC","overhead","."]
code: def benchmark_IPC(self, num_iter, warmup=10):
      """
      Benchmark the dataloader where each worker outputs nothing. This
      eliminates the IPC overhead compared to the regular dataloader.
  
      PyTorch multiprocessing's IPC only optimizes for torch tensors.
      Large numpy arrays or other data structure may incur large IPC overhead.
      """
      n = self.num_workers
      dataset = _EmptyMapDataset(MapDataset(self.dataset, self.mapper))
      loader = build_batch_data_loader(
          dataset, self.sampler, self.total_batch_size, num_workers=n
      )
      self._benchmark(
          iter(loader),
          num_iter * max(n, 1),
          warmup * max(n, 1),
          f"DataLoader ({n} workers, bs={self.per_gpu_batch_size}) w/o comm",
      )
  
imports: import logging
  import numpy
  from itertools import count
  from typing import List, Tuple
  import torch
  import tqdm
  from fvcore.common.timer import Timer
  from detectron2.utils import comm
  from .build import build_batch_data_loader
  from .common import DatasetFromList, MapDataset
  from .samplers import TrainingSampler
label_desc: Use image node_id 7 for calling the DataLoaderBenchmark obj's underlying member method code with example usage: obj.benchmark_IPC(num_iter, warmup) without return types