LeiWang1999 commented on PR #16250:
URL: https://github.com/apache/tvm/pull/16250#issuecomment-1902609084

   
   looks like the verify is too strict to tensorize primitive:
   
   ```cpp
     void VisitExpr_(const VarNode* op, ObjectPath path) override {
       auto var = GetRef<Var>(op);
   
       auto active_def = currently_defined_.find(var);
       auto verify = Verify(active_def != currently_defined_.end());
       verify << "ValueError: "
              << "Invalid use of undefined variable " << var << " at " << path 
<< ".";
   
       // Check if there was a previous definition, and append the
       // location to the error message if there was.  This is to aid in
       // debugging, by distinguishing between a variable that is
       // currently out-of-scope, and a variable that never had a
       // definition in the first place.
       if (auto prev_def = previously_defined_.find(var); prev_def != 
previously_defined_.end()) {
         verify << ".  While this variable was previously defined at " << 
prev_def->second
                << ", this definition is no longer in-scope.";
       }
     }
   ```
   
   


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