class_docstr: Tests just-in-time cpp extensions.
  Don't confuse this with the PyTorch JIT (aka TorchScript).
code: def test_jit_compile_extension(self):
      module = torch.utils.cpp_extension.load(
          name="jit_extension",
          sources=[
              "cpp_extensions/jit_extension.cpp",
              "cpp_extensions/jit_extension2.cpp",
          ],
          extra_include_paths=["cpp_extensions"],
          extra_cflags=["-g"],
          verbose=True,
      )
      x = torch.randn(4, 4)
      y = torch.randn(4, 4)
  
      z = module.tanh_add(x, y)
      self.assertEqual(z, x.tanh() + y.tanh())
  
      # Checking we can call a method defined not in the main C++ file.
      z = module.exp_add(x, y)
      self.assertEqual(z, x.exp() + y.exp())
  
      # Checking we can use this JIT-compiled class.
      doubler = module.Doubler(2, 2)
      self.assertIsNone(doubler.get().grad)
      self.assertEqual(doubler.get().sum(), 4)
      self.assertEqual(doubler.forward().sum(), 8)
  
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 5 for calling the TestCppExtensionJIT obj's underlying member method code with example usage: obj.test_jit_compile_extension() without return types