wrongtest commented on a change in pull request #10557:
URL: https://github.com/apache/tvm/pull/10557#discussion_r824784743
##########
File path: src/tir/transforms/compact_buffer_region.cc
##########
@@ -53,12 +53,30 @@ Region SimplifyAndNarrowBufferRegionFromNDIntSet(const
NDIntSet& nd_int_set,
for (size_t i = 0; i < nd_int_set.size(); ++i) {
const arith::IntSet& int_set = nd_int_set[i];
Range range = int_set.CoverRange(Range(/*begin=*/0,
/*end=*/original_shape[i]));
- result.push_back(
- Range::FromMinExtent(analyzer->Simplify(range->min),
analyzer->Simplify(range->extent)));
+ result.push_back(Range::FromMinExtent(
+ analyzer->Simplify(range->min),
analyzer->Simplify(min(original_shape[i], range->extent))));
Review comment:
Whether we need `max(0, range->min)`?
--
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]