adstraw commented on a change in pull request #10558:
URL: https://github.com/apache/tvm/pull/10558#discussion_r826102239



##########
File path: src/tir/transforms/lower_vtcm_alloc.cc
##########
@@ -34,12 +34,11 @@ class VtcmAllocator : public StmtExprMutator {
   VtcmAllocator() {}
 
   Stmt VisitStmt_(const AllocateNode* op) final {
-    Stmt body = this->VisitStmt(op->body);
     std::string storage_scope = GetStorageScope(op->buffer_var);
-    Stmt stmt = StmtExprMutator::VisitStmt_(op);
-    op = stmt.as<AllocateNode>();
 
+    Stmt stmt = StmtExprMutator::VisitStmt_(op);
     if (IsVtcmStorage(storage_scope)) {
+      Stmt body = this->VisitStmt(op->body);

Review comment:
       Looks like option A will work.  Trying that now.




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