code: def test_compile_link_autotune_matmul():
      np.random.seed(3)
  
      with tempfile.TemporaryDirectory() as tmp_dir:
          dtype = "fp16"
  
          kernel_path = write_triton_kernels(
              tmp_dir, kernel_src, kernel_utils_src
          )
  
          tile_sizes = [
              [16, 16, 16],
              [32, 32, 16],
              [32, 32, 32],
              [64, 64, 32],
          ]
  
          for ts in tile_sizes:
              BM, BN, BK = ts[0], ts[1], ts[2]
              compile_aot_kernels(
                  tmp_dir,
                  kernel_path,
                  dtype,
                  BM,
                  BN,
                  BK,
                  ha_hb_hints=["", ":16"],
              )
  
          link_aot_kernels(tmp_dir)
  
          gen_kernel_library(tmp_dir, "libkernel.so")
  
          # compile test case
          M, N, K = 64, 64, 64
          # initialize test data
          a, b, a_path, b_path, c_path = generate_matmul_test_data(
              tmp_dir, M, N, K
          )
          c_ref = np.matmul(a.astype(np.float32), b.astype(np.float32))
  
          for algo_id in range(len(tile_sizes)):
              # generate and run test case
              test_name = f"test_{algo_id}"
              gen_test_bin(
                  tmp_dir, M, N, K, exe=test_name, algo_id=algo_id
              )
  
              env = os.environ.copy()
              env["LD_LIBRARY_PATH"] = tmp_dir
              subprocess.run(
                  [f"./{test_name}", a_path, b_path, c_path],
                  check=True,
                  cwd=tmp_dir,
                  env=env,
              )
  
              # read data and compare against reference
              c = np.genfromtxt(c_path, delimiter=",", dtype=np.int32)
              c_tri = c.reshape((M, N)).view(np.float32)
              np.testing.assert_allclose(
                  c_tri, c_ref * c_ref, atol=1e-4, rtol=1e-4
              )
  
imports: import glob
  import os
  import subprocess
  import sys
  import tempfile
  import numpy
  import triton
  from triton.backends.nvidia.driver import include_dir, library_dir
label_desc: Use image node_id 12 for calling a global function with example usage: test_compile_link_autotune_matmul() without return types