Skip to content

Commit

Permalink
fix string argument mismatch in GraphRuntimeCodegen (#5933)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy authored Jun 28, 2020
1 parent e99e116 commit ff7a152
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion python/tvm/autotvm/task/relay_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/relay/backend/graph_runtime_codegen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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];
});
Expand Down

0 comments on commit ff7a152

Please sign in to comment.