code: def call_all_topi_funcs(mod, params, target, error_list, opt_level=3):
      """Call all TOPI compute to extract auto_scheduler tasks in a Relay program"""
      # pylint: disable=import-outside-toplevel
      from tvm import relay
  
      # Turn off AutoTVM config not found warnings
      old_autotvm_silent = autotvm.GLOBAL_SCOPE.silent
      autotvm.GLOBAL_SCOPE.silent = True
  
      with transform.PassContext(
          opt_level=opt_level,
          config={
              "relay.backend.use_auto_scheduler": True,
          },
          disabled_pass={"AutoSchedulerLayoutRewrite"},
      ):
          compiler = relay.vm.VMCompiler()
          if params:
              compiler.set_params(params)
          mod = (
              tvm.IRModule.from_expr(mod)
              if isinstance(mod, relay.Function)
              else mod
          )
          try:
              compiler.lower(mod, target)
          except TVMError:
              error_list.append(f"{traceback.format_exc()}")
          finally:
              autotvm.GLOBAL_SCOPE.silent = old_autotvm_silent
  
imports: import json
  import logging
  import threading
  import traceback
  import tvm
  from tvm import autotvm, transform
  from tvm._ffi.base import TVMError
  from tvm.ir.transform import PassContext
  from tvm.runtime import convert_to_object
  from tvm.target import Target
  from tvm.te.tensor import ComputeOp, PlaceholderOp, Tensor
  from tvm.tir import Reduce
  from tvm.tir import expr
  from .None import _ffi_api
  from .compute_dag import ComputeDAG, LayoutRewriteOption
  from .dispatcher import DispatchContext
  from .search_task import SearchTask
  from .utils import get_const_tuple
  from .workload_registry import register_workload_tensors
label_desc: Use image node_id 1 for calling a global function with example usage: call_all_topi_funcs(mod, params, target, error_list, opt_level) without return types