class_docstr: Tests Open Device Registration with C++ extensions.
      
class_docstr_tok: ["Tests","Open","Device","Registration","with","C++","extensions","."]
code: def setUpClass(cls):
      remove_build_path()
      cls.module = torch.utils.cpp_extension.load(
          name="custom_device_extension",
          sources=[
              "cpp_extensions/open_registration_extension.cpp",
          ],
          extra_include_paths=["cpp_extensions"],
          extra_cflags=["-g"],
          verbose=True,
      )
  
imports: import os
  import shutil
  import sys
  from typing import Union
  import tempfile
  import unittest
  import torch.testing._internal.common_utils
  from torch.testing._internal.common_utils import IS_ARM64, TEST_CUDA
  import torch
  import torch.utils.cpp_extension
  from torch.utils.cpp_extension import CUDA_HOME, ROCM_HOME
label_desc: Use image node_id 3 for calling the TestCppExtensionOpenRgistration obj's underlying member method code with example usage: obj.setUpClass(cls) without return types