def run_vm(code, lib): vm_exec = tvm.runtime.vm.Executable.load_exec(code, lib) vm = VirtualMachine(vm_exec, tvm.gpu(0)) result = vm.invoke("main", data=i_data) return result
def run_vm(vm_exec, input_, ctx=tvm.cpu(0)): vm = VirtualMachine(vm_exec, ctx) _out = vm.invoke("main", input_) return vmobj_to_list(_out)