code: def make_run_fn(
      self, *input_tensors: torch.Tensor, output_tensor: torch.Tensor
  ) -> Callable[[], None]:
      self.DLL, self.hash_key, self.source_file = CUDACodeCache.load(
          self.source_code, "so"
      )
      args = [
          c_void_p(tensor.data_ptr())
          for tensor in list(input_tensors) + [output_tensor]
      ]
      log.debug(
          "make_run_fn: self.kernel_name=%s, self.source_file=%s, self.hash_key=%s, self.DLL=%s, args=%s, self.extra_args=%s",
          self.kernel_name,
          self.source_file,
          self.hash_key,
          self.DLL,
          args,
          self.extra_args,
      )
      run_method = getattr(self.DLL, self.kernel_name)
      stream_ptr = c_void_p(torch.cuda.current_stream().cuda_stream)
  
      # Retrieve workspace_size and initialize workspace.
      c_workspace_size = c_size_t()
      run_method(
          *args,  # input ptrs and output ptrs
          *self.extra_args,
          byref(
              c_workspace_size
          ),  # set workspace size ptr to retrieve workspace size
          None,  # null workspace ptr
          stream_ptr,
      )
      self.workspace_size = c_workspace_size.value
      # TODO: Support non-zero workspace_size.
      assert self.workspace_size == 0, (
          "Things need to be fixed to support non-zero workspace_size: "
          "1) max autotune cache needs to store workspace size; "
          "2) memory allocation needs to allocate / deallocate workspace correctly; "
      )
  
      # Generate partial function.
      return functools.partial(
          run_method,
          *args,
          *self.extra_args,
          None,  # null workspace size ptr
          None,  # set workspace ptr, TODO: update it to a real ptr if workspace_size > 0
          stream_ptr,
      )
  
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 2 for calling the CUDABenchmarkRequest obj's underlying member method code with example usage: obj.make_run_fn() and returns: functools