code: def compile_and_benchmark(label, model, targets, dev, tmp_dir):
      """Compile model for target and run it with profiling."""
      logging.info(
          f"Compiling {model['name']} using {label} with {targets}..."
      )
      exe = tvm.relay.vm.compile(
          model["mod"], target=targets, params=model["params"]
      )
      lib_path = os.path.join(tmp_dir, "lib.so")
      code_path = os.path.join(tmp_dir, "code.ro")
      code, lib = exe.save()
      logging.info(f"Saving VM code to {code_path}...")
      with open(code_path, "wb") as fo:
          fo.write(code)
      logging.info(f"Exporting library to {lib_path}...")
      lib.export_library(lib_path, workspace_dir=tmp_dir, cc="nvcc")
      runner = f"{runner_template}    run('{label}', '{model['name']}', tvm.device({dev.device_type}), '{lib_path}', '{code_path}', {model['input_shapes']}, {model['input_dtypes']})\n"
      runner_path = os.path.join(tmp_dir, "runner.py")
      logging.info(f"Saving runner to {runner_path}...")
      with open(runner_path, "w") as fo:
          fo.write(runner)
  
      logging.info(f"Invoking runner...")
      if PROFILE:
          profile_path = os.path.join(tmp_dir, "profile.txt")
          os.system(
              f"nsys nvprof -o {profile_path} python3 {runner_path}"
          )
      else:
          os.system(f"python3 {runner_path}")
  
imports: import tvm
  import logging
  import tempfile
  import os
  import shutil
  import menangerie
  from tvm.relay.op.contrib.cutlass import partition_for_cutlass
  from tvm.contrib.cutlass import num_cutlass_partitions
  from tvm.relay.op.contrib.cublas import partition_for_cublas
  from tvm.relay.op.contrib.cudnn import partition_for_cudnn
label_desc: Use image node_id 6 for calling a global function with example usage: compile_and_benchmark(label, model, targets, dev, tmp_dir) without return types