Lunderberg commented on PR #16296:
URL: https://github.com/apache/tvm/pull/16296#issuecomment-1874240274

   I did some digging, and it looks like this is able to occur because 
`ConstIntBound` doesn't check for `SideEffect(expr) <= CallEffectKind(kPure)` 
[here](https://github.com/apache/tvm/blob/main/src/arith/const_int_bound.cc#L664),
 when entering the a constrained context.  
   
   I think the general approach here is correct, that the checking for side 
effects should happen at the scope providing the constraint, as the 
`ConstIntBound` and `RewriteSimplifier` do not have sufficient context to 
determine whether a constraint holds for the duration of the scope.  At some 
point, we probably should remove the `SideEffect` check in `RewriteSimplifier` 
to match that of `ConstIntBound`.


-- 
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]

Reply via email to