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

   This PR enhances the canonical simplifier to support the following patterns:
   
   `x0 * s0 + x1 * s1 + ... + xn + c < 0, let d = gcd(s0, s1, ..., s{n-1}, c)`
   
   1. if can prove -d < xn < d, then we can simplify the expression to `x0 * 
(s0/d) + x1 * (s1/d) + ... + x{n-1} * (s{n-1}/d) < c/d`, e.g. `x * 8 + y < 16` 
where `y` \in [0, 8), we can simplify it to `x < 2`
   2. if xn is in pattern of yn % m, where m % d == 0, convert it to yn // d % 
(m/d) e.g. `x1 * 64 + (x2 * 8 + x3) % 64 < 120`, `x3` \in [0, 8), we can 
simplify it to `x1 * 8 + (x2 * 8 + x3) // 8 % 8 < 15` ==> `x1 * 8 + x2 % 8 < 15`
   
   cc @tqchen 


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