flip1995 commented on issue #4272:
URL: https://github.com/apache/incubator-tvm/issues/4272#issuecomment-709342481


   Or to be more precise, you have to load your model like this:
   
   ```python
   import ctypes
   
   import tvm
   from tvm.contrib import graph_runtime as runtime
   
   libvta_path = "/home/xilinx/tvm/build/libvta.so"
   ctypes.CDLL(libvta_path, ctypes.RTLD_GLOBAL)
   
   # load compiled model
   with open("graph.json", "r") as graph_file:
       graph = graph_file.read()
   with open("params.params", "rb") as params_file:
       params = bytearray(params_file.read())
   lib = tvm.module.load("./lib.tar")
   
   ctx = tvm.ext_dev(0)
   
   module = runtime.create(graph, lib, ctx)
   module.load_params(params)
   ```
   
   After that `module.run(**<input-dict>)` should work


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to