mbs-octoml commented on a change in pull request #8423:
URL: https://github.com/apache/tvm/pull/8423#discussion_r708681087



##########
File path: src/relay/backend/te_compiler.cc
##########
@@ -383,10 +384,9 @@ class LowerTensorExprMutator : public ExprMutator {
    *  \brief Returns the primitive function associated with \p expr, or
    *  nullptr if none.
    */
-  Function ResolveToPrimitive(Expr expr) {
+  BaseFunc ResolveToPrimitive(Expr expr) {
     if (const GlobalVarNode* gvn = expr.as<GlobalVarNode>()) {
-      BaseFunc base_func = module_->Lookup(GetRef<GlobalVar>(gvn));
-      return ResolveToPrimitive(base_func);
+      return module_->Lookup(GetRef<GlobalVar>(gvn));

Review comment:
       Ah, sorry 'primitive' is overloaded. What I mean is the interpreter may 
encounter Relay functions which are not marked with the kPrimitive attribute, 
and those should not be lowered. That filtering used to be done by the 
recursive call you removed.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to