masahi commented on a change in pull request #9380:
URL: https://github.com/apache/tvm/pull/9380#discussion_r741475626
##########
File path: python/tvm/relay/backend/vm.py
##########
@@ -275,14 +275,18 @@ def __init__(self, mod, device, target):
self.mod = mod
self.device = device
self.target = target
- self.executable = compile(mod, target)
- self.vm = vm_rt.VirtualMachine(self.executable, device)
+ self.executable = None
+ self.vm = None
def _make_executor(self, expr=None):
- main = self.mod["main"]
+ if expr:
+ self.mod["main"] = expr
+
+ self.executable = compile(self.mod, self.target)
+ self.vm = vm_rt.VirtualMachine(self.executable, self.device)
def _vm_wrapper(*args, **kwargs):
- args = self._convert_args(main, args, kwargs)
+ args = self._convert_args(self.mod["main"], args, kwargs)
Review comment:
I do not understand why you need to change this file?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]