ekalda commented on code in PR #16523:
URL: https://github.com/apache/tvm/pull/16523#discussion_r1481333106
##########
src/arith/int_set.cc:
##########
@@ -466,14 +466,21 @@ class IntervalSetEvaluator : public
ExprFunctor<IntervalSet(const PrimExpr&)> {
if (stride.Match(op->stride)) {
DataType t = op->base.dtype();
int64_t vstride = stride.Eval()->value;
- if (vstride > 0) {
- return Combine<Add>(analyzer_, base,
- IntervalSet(make_zero(t), make_const(t, vstride *
(op->lanes - 1))),
- op->dtype);
- } else {
- return Combine<Add>(analyzer_, base,
- IntervalSet(make_const(t, vstride * (op->lanes -
1)), make_zero(t)),
- op->dtype);
+ if (op->lanes->IsInstance<IntImmNode>()) {
+ int lanes = static_cast<int>(Downcast<IntImm>(op->lanes)->value);
+ if (vstride > 0) {
+ return Combine<Add>(analyzer_, base,
+ IntervalSet(make_zero(t), make_const(t, vstride
* (lanes - 1))),
+ op->dtype);
+ } else {
+ return Combine<Add>(analyzer_, base,
+ IntervalSet(make_const(t, vstride * (lanes -
1)), make_zero(t)),
+ op->dtype);
+ }
+ } else { /* Scalable vector */
+ if (vstride > 0) {
+ return Combine<Add>(analyzer_, base, IntervalSet(make_zero(t),
pos_inf()), op->dtype);
+ }
Review Comment:
Yeah we probably should :)
--
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]