class_docstr: Only handle triton template benchmark for now. The extern kernel benchmark
  can be done inside the same process since they usually don't cause crash.
class_docstr_tok: ["Only","handle","triton","template","benchmark","for","now",".","The","extern","kernel","benchmark","can","be","done","inside","the","same","process","since","they","usually","do","n't","cause","crash","."]
code: def __init__(
      self,
      kernel_name: str,
      input_tensor_meta: Union[TensorMeta, List[TensorMeta]],
      output_tensor_meta: Union[TensorMeta, List[TensorMeta]],
      extra_args: Iterable[Any],
  ):
      # the kernel name defined in the module
      self.kernel_name = kernel_name
  
      if isinstance(input_tensor_meta, TensorMeta):
          input_tensor_meta = [input_tensor_meta]
      self.input_tensor_meta = input_tensor_meta
  
      if isinstance(output_tensor_meta, (tuple, list)):
          assert len(output_tensor_meta) == 1
          output_tensor_meta = output_tensor_meta[0]
      self.output_tensor_meta = output_tensor_meta
  
      self.extra_args = extra_args
  
imports: from __future__ import annotations
  import contextlib
  import dataclasses
  import functools
  import logging
  import os
  import queue
  import time
  import warnings
  from concurrent.futures import ThreadPoolExecutor
  from ctypes import byref, c_size_t, c_void_p
  from multiprocessing.process import BaseProcess
  from multiprocessing.queues import Queue
  from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, TYPE_CHECKING, Union
  import torch
  from torch import multiprocessing
  from torch._dynamo.testing import rand_strided
  from torch._inductor import ir
  from torch._inductor.codecache import CUDACodeCache, DLLWrapper, PyCodeCache
  from .None import config
  from .utils import do_bench
  from .virtualized import V
label_desc: Use image node_id 1 to create a new BenchmarkRequest object  with example: obj = BenchmarkRequest(kernel_name, input_tensor_meta, output_tensor_meta, extra_args)