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)
});
} 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];
});