Lunderberg opened a new pull request, #17158:
URL: https://github.com/apache/tvm/pull/17158

   Prior to this commit, there was no rule to simplify `x == x` into `True`.  
In some cases, despite not having an explicit rewrite rule in 
`RewriteSimplifier`, the `RewriteSimplifier::CanProve` function would check if 
`x-x` simplifies to zero, relying on the rewrite rules used for `tir::Sub`.  
However, the rule to rewrite `x-x` into zero was only enabled for `int32`, 
`int64`, and floating-point types, so relying on this behavior was inconsistent.
   
   This commit updates the rewrite rules for both `tir::EQ` and `tir::Sub` to 
check for simplification of `x-x` or `x==x`, regardless of the datatype.  This 
change preserves the fast-path for index data-types, in which `int32` and 
`int64` expressions may be simplified without checking for side effects.  For 
all other dtypes, the cancellation only applies when evaluating `x` has no side 
effects.


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