wrongtest commented on code in PR #11287:
URL: https://github.com/apache/tvm/pull/11287#discussion_r880010949
##########
src/arith/iter_affine_map.cc:
##########
@@ -1062,58 +1099,59 @@ PaddedIterMapResult DetectPaddedIterMap(const
Array<PrimExpr>& indices,
[](const IterConstraint& a, const IterConstraint& b) { return
a.expr_size < b.expr_size; });
IterMapRewriter rewriter(analyzer, constrained_input_iters,
simplify_trivial_iterators,
- &result.errors);
+ &result->errors);
// Step0.0: rewrite constraints in the order from size-small ones to
size-big ones
for (const IterConstraint& constraint : constraints) {
auto res = rewriter.RewriteIterConstraint(constraint.iter,
constraint.lower_bound,
constraint.upper_bound);
- if (result.errors.size()) {
- return result;
+ if (result->errors.size()) {
+ return result_obj;
}
}
if (!rewriter.CheckConstraints()) {
- result.errors.push_back("Invalid constraints.");
- return result;
+ result->errors.push_back("Invalid constraints.");
+ return result_obj;
}
// Step0.1: Check each index to determine required padding
- bool allow_padding = !require_bijective;
+ bool allow_padding = check_level != IterMapLevel::Bijective;
Review Comment:
That is the claim~ I try to change padding to iter mark itself.
For example,`(x + 7)` `x` in [0, 8) => `IterMark(IterSplit(IterSum({x}, 7),
lower_factor=1, extent=16, scale=1), extent=16` with left_pad=7, right_pad=1
Then `(x + 7) // 8` is mapped to range [0, extent//2) == [0, 2), though we
have padding into iter mark, the IterSplit's range can be achieved when we only
iterate `x` in it's original domain: (0 + 7) // 8 = 0, (7 + 7) // 8 = 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]