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 2022/11/09 19:03:01 UTC

[GitHub] [tvm] vinx13 commented on a diff in pull request #13301: [TIR] Update ReductionIterNotIndexOutputBuffer to check BlockRealizeN…

vinx13 commented on code in PR #13301:
URL: https://github.com/apache/tvm/pull/13301#discussion_r1018312684


##########
src/tir/schedule/analysis/reducer.cc:
##########
@@ -572,9 +572,25 @@ bool ReductionIterNotIndexOutputBuffer(const Block& block) {
     if (!store) {
       return true;
     }
-    ICHECK(buffer_written.count(store->buffer.get()))
-        << "ValueError: The buffer \"" << store->buffer
-        << "\" is written in the block but is not in the block's signature";
+    const auto* body_block = block->body.as<BlockRealizeNode>();

Review Comment:
   checking block->body is not sufficient. It is possible the inner block has outer loops. 
   consider the case:
   ```
   block1
     for …
        block2
           match_buffer
           buffer_store
   ```
   
   In this case, we need to the parent block of the store statement 



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org