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: [email protected]

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

Reply via email to