Skip to content

Commit

Permalink
Fix typo in relay.vm.Executable (apache#7543)
Browse files Browse the repository at this point in the history
Co-authored-by: Yanming Wang <yanmwang@amazon.com>
  • Loading branch information
2 people authored and trevor-m committed Mar 2, 2021
1 parent a18d2f7 commit eaa80fb
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 eaa80fb

Please sign in to comment.