You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/01/17 07:00:40 UTC

[GitHub] [incubator-tvm] hlu1 commented on a change in pull request #4723: [Relay] Invoke tvm::build from relay compile_engine and interpreter

hlu1 commented on a change in pull request #4723: [Relay] Invoke tvm::build from relay compile_engine and interpreter
URL: https://github.com/apache/incubator-tvm/pull/4723#discussion_r367793036
 
 

 ##########
 File path: src/relay/backend/compile_engine.cc
 ##########
 @@ -599,12 +599,13 @@ class CompileEngineImpl : public CompileEngineNode {
     CCacheValue value = LowerInternal(key);
     if (value->packed_func != nullptr) return value->packed_func;
     // build the function.
+    tvm::runtime::Module m;
     if (const auto* f = runtime::Registry::Get("relay.backend.build")) {
-      tvm::runtime::Module m = (*f)(value->cached_func->funcs, key->target);
-      value->packed_func = m.GetFunction(value->cached_func->func_name);
+      m = (*f)(value->cached_func->funcs, key->target);
     } else {
-      LOG(FATAL) << "relay.backend.build is not registered";
+      m = build(value->cached_func->funcs, key->target, key->target, BuildConfig::Current());
 
 Review comment:
   Fixed

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services