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/11/06 11:51:32 UTC

[GitHub] [incubator-tvm] giuseros commented on a change in pull request #6859: [Bugfix][Module] Fix recursive GetFunction in runtime::Module

giuseros commented on a change in pull request #6859:
URL: https://github.com/apache/incubator-tvm/pull/6859#discussion_r518702980



##########
File path: src/runtime/module.cc
##########
@@ -68,6 +68,9 @@ PackedFunc ModuleNode::GetFunction(const std::string& name, bool query_imports)
   if (query_imports) {
     for (Module& m : self->imports_) {
       pf = m.operator->()->GetFunction(name, query_imports);
+      if (pf != nullptr) {
+        return pf;
+      }
     }
   }
   return pf;

Review comment:
       Would it be worth (and correct) putting an assert like `ICHECK(pf != nullptr) << "unable to get the function pointer"` ?




----------------------------------------------------------------
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