code: def test_cuda_load(self):
      # Test both .o and .so compilation.
      (
          object_file_path,
          object_hash_key,
          source_code_path0,
      ) = CUDACodeCache.compile(_SOURCE_CODE, "o")
      dll_wrapper, so_hash_key, source_code_path1 = CUDACodeCache.load(
          _SOURCE_CODE, "so"
      )
      self.assertNotEqual(source_code_path0, source_code_path1)
      self.assertNotEqual(object_hash_key, so_hash_key)
  
      # Test load and call functions in .so.
      x = torch.rand(10).float().cuda()
      y = torch.rand(10).float().cuda()
      a = 5.0
      expected_y = a * x + y
      res = dll_wrapper.saxpy(
          ctypes.c_int(10),
          ctypes.c_float(a),
          ctypes.c_void_p(x.data_ptr()),
          ctypes.c_void_p(y.data_ptr()),
      )
      torch.testing.assert_close(y, expected_y)
  
file_path: pytorch/test/inductor/test_cudacodecache.py
imports: import ctypes
  import unittest
  import torch
  from torch._inductor import config
  from torch._inductor.codecache import AsyncCompile, CUDACodeCache
  from torch._inductor.codegen.cuda.cuda_env import nvcc_exist
  from torch._inductor.exc import CUDACompileError
  from torch.testing._internal.common_utils import TestCase
label_desc: Use image node_id 1 for calling the TestCUDACodeCache obj's underlying member method code with example usage: obj.test_cuda_load() without return types