tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tqc...@apache.org
Subject [incubator-tvm] branch master updated: fix string argument mismatch in GraphRuntimeCodegen (#5933)
Date Sun, 28 Jun 2020 00:09:51 GMT
This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git


The following commit(s) were added to refs/heads/master by this push:
     new ff7a152  fix string argument mismatch in GraphRuntimeCodegen (#5933)
ff7a152 is described below

commit ff7a152d2cfcb296232c460c7185117c07233e4c
Author: Lianmin Zheng <lianminzheng@gmail.com>
AuthorDate: Sat Jun 27 17:09:39 2020 -0700

    fix string argument mismatch in GraphRuntimeCodegen (#5933)
---
 python/tvm/autotvm/task/relay_integration.py | 4 +++-
 src/relay/backend/graph_runtime_codegen.cc   | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/python/tvm/autotvm/task/relay_integration.py b/python/tvm/autotvm/task/relay_integration.py
index 9751d90..9a43f2f 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 bc8b390..19e6770 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];
       });


Mime
View raw message