tqchen commented on code in PR #15264:
URL: https://github.com/apache/tvm/pull/15264#discussion_r1257339271
##########
src/arith/iter_affine_map.cc:
##########
@@ -2061,6 +2061,9 @@ class IterMapToExprNormalizer : public ExprMutator {
if (analyzer_->CanProve(expr->extent == expr->source->extent) &&
is_one(expr->lower_factor)) {
return source * expr->scale;
} else if (analyzer_->CanProve(expr->source->extent == expr->lower_factor
* expr->extent)) {
+ if (is_one(expr->extent) && !is_one(expr->lower_factor)) {
Review Comment:
I think it is better to use
```c++
`is_one(expr->extent) && !is_one(expr->source->extent)`
```
This will cover all the non-trivial iterator case, including cases like`(i
// 10) % 1`
--
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]