Skip to content

Commit

Permalink
Fix typo in relay.vm.Executable (#7543)
Browse files Browse the repository at this point in the history
Co-authored-by: Yanming Wang <yanmwang@amazon.com>
  • Loading branch information
ymwangg and ymwangg authored Feb 27, 2021
1 parent b1b3823 commit 485dfd6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tvm/runtime/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def save(self):
# define a simple network.
x = relay.var('x', shape=(10, 10))
f = relay.Function([x], x + x)
mod = relay.Module({"main": f})
mod = tvm.IRModule({"main": f})
# create a Relay VM.
ctx = tvm.cpu()
target = "llvm"
Expand All @@ -128,7 +128,7 @@ def save(self):
loaded_lib = tvm.runtime.load_module(path_lib)
loaded_code = bytearray(open(tmp.relpath("code.ro"), "rb").read())
# deserialize.
des_exec = tvm.runtime.vm.Executable.load_exec(loaded_code, loaded_code)
des_exec = tvm.runtime.vm.Executable.load_exec(loaded_code, loaded_lib)
# execute the deserialized executable.
x_data = np.random.rand(10, 10).astype('float32')
des_vm = tvm.runtime.vm.VirtualMachine(des_exec, ctx)
Expand Down

0 comments on commit 485dfd6

Please sign in to comment.