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:
[email protected]