class_docstr: Build an IR module to run on TVM graph executor. This class is used
  to expose the `RelayBuildModule` APIs implemented in C++.
class_docstr_tok: ["Build","an","IR","module","to","run","on","TVM","graph","executor",".","This","class","is","used","to","expose","the","`","RelayBuildModule","`","APIs","implemented","in","C++","."]
docstr: Parameters
  ----------
  mod : :py:class:`~tvm.IRModule`
      The IR module to build.
  
  target : any multi-target like object, see Target.canon_multi_target.
      For homogeneous compilation, the unique build target.
      For heterogeneous compilation, a dictionary or list of possible build targets.
  
  target_host : None, or any target-like object, see Target.canon_target
      Host compilation target, if target is device.
  
  params : dict of str to NDArray
      Input parameters to the graph that do not change
      during inference time. Used for constant folding.
  
  Returns
  -------
  mod : :py:class:`~tvm.IRModule`
      The optimized relay module.
  
  params : dict
      The parameters of the final graph.
docstr_tok: ["Parameters","--","--","--","--","--","mod",":",":","py",":","class",":","`","~tvm.IRModule","`","The","IR","module","to","build",".","target",":","any","multi-target","like","object",",","see","Target.canon_multi_target",".","For","homogeneous","compilation",",","the","unique","build","target",".","For","heterogeneous","compilation",",","a","dictionary","or","list","of","possible","build","targets",".","target_host",":","None",",","or","any","target-like","object",",","see","Target.canon_target","Host","compilation","target",",","if","target","is","device",".","params",":","dict","of","str","to","NDArray","Input","parameters","to","the","graph","that","do","not","change","during","inference","time",".","Used","for","constant","folding",".","Returns","--","--","--","-","mod",":",":","py",":","class",":","`","~tvm.IRModule","`","The","optimized","relay","module",".","params",":","dict","The","parameters","of","the","final","graph","."]
code: def optimize(self, mod, target=None, target_host=None, params=None):
      """
      Parameters
      ----------
      mod : :py:class:`~tvm.IRModule`
          The IR module to build.
  
      target : any multi-target like object, see Target.canon_multi_target.
          For homogeneous compilation, the unique build target.
          For heterogeneous compilation, a dictionary or list of possible build targets.
  
      target_host : None, or any target-like object, see Target.canon_target
          Host compilation target, if target is device.
  
      params : dict of str to NDArray
          Input parameters to the graph that do not change
          during inference time. Used for constant folding.
  
      Returns
      -------
      mod : :py:class:`~tvm.IRModule`
          The optimized relay module.
  
      params : dict
          The parameters of the final graph.
      """
      raw_targets = Target.canon_multi_target_and_host(
          target, target_host
      )
  
      # Setup the params.
      if params:
          self._set_params(params)
      mod = self._optimize(mod, raw_targets)
      # Get artifacts
      params = self.get_params()
  
      return mod, params
  
imports: import warnings
  import numpy
  from tvm.ir import IRModule
  from tvm.target import Target
  from ..None import autotvm
  from ..None import nd
  from ..None import register_func
  from ..contrib import graph_executor
  from ..contrib import utils
  from ..runtime import load_module
  from ..runtime.executor import aot_executor
  from ..target import Target
  from .None import _build_module
  from .None import expr
  from .None import function
  from .None import ty
  from .backend import Executor, Runtime
  from .backend import executor_factory
  from .backend import interpreter
  from .backend.utils import mangle_module_name
  from .backend.vm import VMExecutor
  from .transform import InferType
label_desc: Use image node_id 3 for calling the BuildModule obj's underlying member method code with example usage: obj.optimize(mod, target, target_host, params) and returns: mod,  params