code: def collage(model):
      """Run the Collage partitioner for a set of CUDA-related targets and profile the result"""
      logging.info(f"collage | {model['name']}")
      logging.info("-------------- BEGIN ORIGINAL --------------")
      logging.info(model["mod"])
      logging.info("-------------- END ORIGINAL ----------------")
      autotvm_tune_module(model["mod"], CUDA, TUNING_LOG)
      with optional_tuning_records(TUNING_LOG):
          targets = []
          targets.append(CUDA)
          use_fp16 = model["main_dtype"] == "float16"
          targets.append(
              tvm.target.Target(
                  f"tensorrt -use_implicit_batch=False -use_fp16={use_fp16}",
                  HOST,
              )
          )
          tmp_dir = tempfile.mkdtemp()
          targets.append(
              tvm.target.Target(f"cutlass -tmp_dir={tmp_dir}", HOST)
          )
          targets.append(tvm.target.Target("cublas", HOST))
          targets.append(tvm.target.Target("cudnn", HOST))
          config = {
              "relay.collage.tvm_max_depth": TVM_MAX_DEPTH,
              "relay.collage.byoc_max_depth": BYOC_MAX_DEPTH,
              "relay.collage.byoc_fusion_style": [
                  "cutlass.NoFusion",
                  "cublas.NoFusion",
                  "cudnn.NoFusion",
                  "tensorrt.TVMFusion",
              ],
          }
          logging.info(f"Using PassContext(config={config}")
          ctxt = tvm.transform.PassContext(config=config)
          config = tvm.target.make_compilation_config(ctxt, targets)
          with ctxt:
              mod = model["mod"]
              mod = tvm.relay.transform.CapturePostDfsIndexInSpans()(
                  mod
              )
              logging.info(
                  "-------------- BEGIN INDEXED --------------"
              )
              logging.info(mod)
              logging.info(
                  "-------------- END INDEXED ----------------"
              )
              mod = tvm.relay.transform.CollagePartition(config)(mod)
              partitioned_model = model.copy()
              partitioned_model["mod"] = mod
              logging.info(
                  "-------------- BEGIN PARTITIONED --------------"
              )
              logging.info(partitioned_model["mod"])
              logging.info(
                  "-------------- END PARTITIONED ----------------"
              )
              dev = tvm.device(CUDA.get_target_device_type())
              compile_and_benchmark(
                  "collage", partitioned_model, targets, dev, tmp_dir
              )
  
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 7 for calling a global function with example usage: collage(model) without return types