code: def _compile_unix_nvcc(
      self, obj: str, src: str, ext: Extension
  ) -> None:
      cc_args = self._get_preprocess_options(ext) + ["-c"]
  
      # For CUDA C source files, compile them with NVCC.
      nvcc_path = build.get_nvcc_path()
      base_opts = build.get_compiler_base_options(nvcc_path)
      compiler_so = nvcc_path
  
      cuda_version = self._context.features["cuda"].get_version()
      postargs = _nvcc_gencode_options(cuda_version) + [
          "-Xfatbin=-compress-all",
          "-O2",
          '--compiler-options="-fPIC"',
      ]
      if cuda_version >= 11020:
          postargs += ["--std=c++14"]
          num_threads = int(
              os.environ.get("CUPY_NUM_NVCC_THREADS", "2")
          )
          postargs += [f"-t{num_threads}"]
      else:
          postargs += ["--std=c++11"]
      postargs += ["-Xcompiler=-fno-gnu-unique"]
      print("NVCC options:", postargs)
      self.spawn(
          compiler_so
          + base_opts
          + cc_args
          + [src, "-o", obj]
          + postargs
      )
  
imports: import distutils.ccompiler
  import os
  import os.path
  import platform
  import shutil
  import sys
  import subprocess
  from typing import Any, Optional, List
  import setuptools
  import setuptools.msvc
  from setuptools import Extension
  from cupy_builder._context import Context
  import cupy_builder.install_build
label_desc: Use image node_id 2 for calling the DeviceCompilerUnix obj's underlying member method code with example usage: obj._compile_unix_nvcc(obj, src, ext) without return types