diff --git a/python/tvm/autotvm/task/relay_integration.py b/python/tvm/autotvm/task/relay_integration.py index 9751d903af5f..9a43f2f1ad95 100644 --- a/python/tvm/autotvm/task/relay_integration.py +++ b/python/tvm/autotvm/task/relay_integration.py @@ -56,7 +56,9 @@ def _lower(mod, opt_mod, _ = relay.optimize(mod, target, params) grc = graph_runtime_codegen.GraphRuntimeCodegen(None, target) grc.codegen(opt_mod["main"]) - except tvm.TVMError: + except tvm.TVMError as e: + print("Get errors with GraphRuntimeCodegen for task extraction. " + "Fallback to VMCompiler. Error details:\n%s" % str(e)) compiler = relay.vm.VMCompiler() if params: compiler.set_params(params) diff --git a/src/relay/backend/graph_runtime_codegen.cc b/src/relay/backend/graph_runtime_codegen.cc index bc8b390716ee..19e67703946f 100644 --- a/src/relay/backend/graph_runtime_codegen.cc +++ b/src/relay/backend/graph_runtime_codegen.cc @@ -587,7 +587,7 @@ class GraphRuntimeCodegenModule : public runtime::ModuleNode { }); } else if (name == "get_param_by_name") { return PackedFunc([sptr_to_self, this](TVMArgs args, TVMRetValue* rv) { - std::string key = args[0]; + String key = args[0]; CHECK_GT(this->output_.params.count(key), 0); *rv = this->output_.params[key]; });