mbaret commented on a change in pull request #7925:
URL: https://github.com/apache/tvm/pull/7925#discussion_r648188950



##########
File path: src/te/operation/compute_op.cc
##########
@@ -484,7 +484,9 @@ ComputeLoopNest ComputeLoopNest::Create(const 
BaseComputeOpNode* self, const Sta
     }
     ret.init_nest = MakeLoopNest(stage, dom_map, begin_loop, true, skip_iter, 
&(ret.init_vmap),
                                  debug_keep_trivial_loop);
-    ret.init_predicates = MakeBoundCheck(stage, dom_map, ret.init_vmap, true, 
skip_iter);
+    bool skip_ivar_domain = !stage->rolling_buffer;
+    ret.init_predicates =
+        MakeBoundCheck(stage, dom_map, ret.init_vmap, skip_ivar_domain, 
skip_iter);

Review comment:
       I agree this is a slight hack. It's because in a rolling buffer we need 
to expand the size and scope of the intermediate buffers and if we drop the 
bound checks they end up getting corrupted. To do this more accurately we'd 
need to replicate something closer to Halide's `store_at` I think to formally 
change the realization point of the intermediate tensor. However this is my 
current workaround.




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


Reply via email to