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 13:25:25 UTC

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

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



##########
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:
       The expected behvaior of this function is to return nullptr for functions inavailable, so we don't want to put ICHECKhere




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