class_docstr: Wrapper runtime module.
  
  This is a thin wrapper of the underlying TVM module.
  you can also directly call set_input, run, and get_output
  of underlying module functions
  
  Parameters
  ----------
  module : tvm.runtime.Module
      The internal tvm module that holds the actual graph functions.
  
  Attributes
  ----------
  module : tvm.runtime.Module
      The internal tvm module that holds the actual graph functions.
  
  Examples
  --------
  
  .. code-block:: python
  
      import tvm
      from tvm import relay
      from tvm.contrib import graph_executor
  
      # build the library using graph executor
      lib = relay.build(...)
      lib.export_library("compiled_lib.so")
      # load it back as a runtime
      lib: tvm.runtime.Module = tvm.runtime.load_module("compiled_lib.so")
      # Call the library factory function for default and create
      # a new runtime.Module, wrap with graph module.
      gmod = graph_executor.GraphModule(lib["default"](dev))
      # use the graph module.
      gmod.set_input("x", data)
      gmod.run()
class_docstr_tok: ["Wrapper","runtime","module",".","This","is","a","thin","wrapper","of","the","underlying","TVM","module",".","you","can","also","directly","call","set_input",",","run",",","and","get_output","of","underlying","module","functions","Parameters","--","--","--","--","--","module",":","tvm.runtime.Module","The","internal","tvm","module","that","holds","the","actual","graph","functions",".","Attributes","--","--","--","--","--","module",":","tvm.runtime.Module","The","internal","tvm","module","that","holds","the","actual","graph","functions",".","Examples","--","--","--","--","..","code-block",":",":","python","import","tvm","from","tvm","import","relay","from","tvm.contrib","import","graph_executor","#","build","the","library","using","graph","executor","lib","=","relay.build","(","...",")","lib.export_library","(","``","compiled_lib.so","''",")","#","load","it","back","as","a","runtime","lib",":","tvm.runtime.Module","=","tvm.runtime.load_module","(","``","compiled_lib.so","''",")","#","Call","the","library","factory","function","for","default","and","create","#","a","new","runtime.Module",",","wrap","with","graph","module",".","gmod","=","graph_executor.GraphModule","(","lib","[","``","default","''","]","(","dev",")",")","#","use","the","graph","module",".","gmod.set_input","(","``","x","''",",","data",")","gmod.run","(",")"]
docstr: Set inputs to the module via kwargs
  
  Parameters
  ----------
  key : int or str
     The input key
  
  value : the input value.
     The input value
  
  params : dict of str to NDArray
     Additional arguments
docstr_tok: ["Set","inputs","to","the","module","via","kwargs","Parameters","--","--","--","--","--","key",":","int","or","str","The","input","key","value",":","the","input","value",".","The","input","value","params",":","dict","of","str","to","NDArray","Additional","arguments"]
code: def set_input(self, key=None, value=None, **params):
      """Set inputs to the module via kwargs
  
      Parameters
      ----------
      key : int or str
         The input key
  
      value : the input value.
         The input value
  
      params : dict of str to NDArray
         Additional arguments
      """
      if key is not None:
          v = self._get_input(key)
          if v is None:
              raise RuntimeError(
                  f"Could not find '{key}' in graph's inputs"
              )
          v.copyfrom(value)
  
      if params:
          # upload big arrays first to avoid memory issue in rpc mode
          keys = list(params.keys())
          keys.sort(key=lambda x: -np.prod(params[x].shape))
          for k in keys:
              # TODO(zhiics) Skip the weights for submodule in a better way.
              # We should use ConstLoaderModule for initialization and remove
              # params from set_input
              val = self._get_input(k)
              if val:
                  self._get_input(k).copyfrom(params[k])
  
imports: import numpy
  import tvm._ffi
  from tvm.rpc import _ffi_api
  from tvm.rpc import base
  from tvm._ffi.base import string_types
  from tvm._ffi.runtime_ctypes import Device
label_desc: Use image node_id 2 for calling the GraphModule obj's underlying member method code with example usage: obj.set_input(key, value) without return types