class_docstr: Tests just-in-time cpp extensions.
  Don't confuse this with the PyTorch JIT (aka TorchScript).
code: def test_jit_cuda_archflags(self):
      # Test a number of combinations:
      #   - the default for the machine we're testing on
      #   - Separators, can be ';' (most common) or ' '
      #   - Architecture names
      #   - With/without '+PTX'
  
      n = torch.cuda.device_count()
      capabilities = {
          torch.cuda.get_device_capability(i) for i in range(n)
      }
      # expected values is length-2 tuple: (list of ELF, list of PTX)
      # note: there should not be more than one PTX value
      archflags = {
          "": (
              [
                  f"{capability[0]}{capability[1]}"
                  for capability in capabilities
              ],
              None,
          ),
          "Maxwell+Tegra;6.1": (["53", "61"], None),
          "Volta": (["70"], ["70"]),
      }
      archflags["7.5+PTX"] = (["75"], ["75"])
      archflags["5.0;6.0+PTX;7.0;7.5"] = (
          ["50", "60", "70", "75"],
          ["60"],
      )
      if int(torch.version.cuda.split(".")[0]) < 12:
          # CUDA 12 drops compute capability < 5.0
          archflags["Pascal 3.5"] = (["35", "60", "61"], None)
  
      for flags, expected in archflags.items():
          self._run_jit_cuda_archflags(flags, expected)
  
imports: import os
  import shutil
  import sys
  import unittest
  import warnings
  import re
  import tempfile
  import subprocess
  import glob
  import torch.testing._internal.common_utils
  from torch.testing._internal.common_cuda import TEST_CUDNN, TEST_CUDA
  import torch
  import torch.backends.cudnn
  import torch.utils.cpp_extension
  from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
  from torch.testing._internal.common_utils import gradcheck
  import torch.multiprocessing
  from torch.utils.cpp_extension import _TORCH_PATH, remove_extension_h_precompiler_headers, get_cxx_compiler, check_compiler_is_gcc
label_desc: Use image node_id 9 for calling the TestCppExtensionJIT obj's underlying member method code with example usage: obj.test_jit_cuda_archflags() without return types