class_docstr: Tests just-in-time cpp extensions.
  Don't confuse this with the PyTorch JIT (aka TorchScript).
code: def test_mps_extension(self):
      module = torch.utils.cpp_extension.load(
          name="torch_test_mps_extension",
          sources=[
              "cpp_extensions/mps_extension.mm",
          ],
          verbose=True,
          keep_intermediates=False,
      )
  
      tensor_length = 100000
      x = torch.randn(tensor_length, device="cpu", dtype=torch.float32)
      y = torch.randn(tensor_length, device="cpu", dtype=torch.float32)
  
      cpu_output = module.get_cpu_add_output(x, y)
      mps_output = module.get_mps_add_output(x.to("mps"), y.to("mps"))
  
      self.assertEqual(cpu_output, mps_output.to("cpu"))
  
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 7 for calling the TestCppExtensionJIT obj's underlying member method code with example usage: obj.test_mps_extension() without return types