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/04/18 16:22:04 UTC

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #5368: [TIR] Fix lower_warp_memory when there are >1 warp buffers

tqchen commented on a change in pull request #5368: [TIR] Fix lower_warp_memory when there are >1 warp buffers
URL: https://github.com/apache/incubator-tvm/pull/5368#discussion_r410718199
 
 

 ##########
 File path: src/tir/transforms/lower_warp_memory.cc
 ##########
 @@ -379,7 +379,7 @@ class WarpMemoryRewriter : private StmtMutator {
   Stmt VisitStmt_(const AllocateNode* op) {
     if (warp_buffer_.count(op->buffer_var.get())) {
       WarpAccessRewriter rewriter(warp_size_, &analyzer_);
-      return rewriter.Rewrite(op);
+      return StmtMutator::VisitStmt_(rewriter.Rewrite(op).as<AllocateNode>());
 
 Review comment:
   Let us consider Post order rewriting pattern instead
   ```c++
   auto ret = StmtMutator::VisitStmt_(op);
   op = ret.as<AllocateNode>();
   if (warp_buffer_.count(op->buffer_var.get())) {
      // rewrite transformations
   }
   return ret;
   ```

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


With regards,
Apache Git Services