Unverified Commit 2433dd46 by Haichen Shen Committed by GitHub

[Bugfix] Fix target host for vm compiler (#4057)

* fix

* tweak
parent 7d71dd8b
......@@ -179,6 +179,11 @@ class VMCompiler(object):
target = _update_target(target)
target_host = None if target_host == "" else target_host
if not target_host:
for device_type, tgt in target.items():
if device_type.value == tvm.nd.cpu(0).device_type:
target_host = tgt
break
if not target_host:
target_host = "llvm" if tvm.module.enabled("llvm") else "stackvm"
target_host = tvm.target.create(target_host)
self._compile(mod, target, target_host)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment