class_docstr: Tests just-in-time cpp extensions.
  Don't confuse this with the PyTorch JIT (aka TorchScript).
code: def test_custom_compound_op_autograd(self):
      # Test that a custom compound op (i.e. a custom op that just calls other aten ops)
      # correctly returns gradients of those other ops
  
      source = """
          #include <torch/library.h>
          torch::Tensor my_add(torch::Tensor x, torch::Tensor y) {
            return x + y;
          }
          TORCH_LIBRARY(my, m) {
              m.def("add", &my_add);
          }
          """
  
      torch.utils.cpp_extension.load_inline(
          name="is_python_module",
          cpp_sources=source,
          verbose=True,
          is_python_module=False,
      )
  
      a = torch.randn(5, 5, requires_grad=True)
      b = torch.randn(5, 5, requires_grad=True)
  
      for fast_mode in (True, False):
          gradcheck(
              torch.ops.my.add, [a, b], eps=1e-2, fast_mode=fast_mode
          )
  
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 29 for calling the TestCppExtensionJIT obj's underlying member method code with example usage: obj.test_custom_compound_op_autograd() without return types