You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/12/29 01:50:31 UTC

[GitHub] [tvm] jcf94 commented on a change in pull request #7173: [AutoScheduler] Use VM to extract tasks for dynamic models

jcf94 commented on a change in pull request #7173:
URL: https://github.com/apache/tvm/pull/7173#discussion_r549539386



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -56,9 +58,20 @@ def call_all_topi_funcs(mod, params, target):
         config={"relay.backend.use_auto_scheduler": True},
         disabled_pass={"AutoSchedulerLayoutRewrite"},
     ):
-        opt_mod, _ = relay.optimize(mod, target, params)
-        grc = graph_runtime_codegen.GraphRuntimeCodegen(None, target)
-        grc.codegen(opt_mod["main"])
+        try:
+            opt_mod, _ = relay.optimize(mod, target, params)
+            grc = graph_runtime_codegen.GraphRuntimeCodegen(None, target)
+            grc.codegen(opt_mod["main"])
+        except tvm.TVMError:
+            print(
+                "Get errors with GraphRuntimeCodegen for task extraction. "
+                "Fallback to VMCompiler."
+            )
+            compiler = relay.vm.VMCompiler()

Review comment:
       So this error will only occur in VM environment?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org