wrongtest-intellif commented on issue #12298:
URL: https://github.com/apache/tvm/issues/12298#issuecomment-1240095516

   @vinx13 I agree here the invocation to standalone `canonical_simplify` is 
quite strange. However actually I try to increase the steps but could not fix 
the issue. The order of `rewrite_simplify` and `canonical_simplify` matters 
such that if we first `rewrite_simplify` (the first step of Simplify), we will 
never be able to proof some cases, no matter how many times of iters, and vice 
versa according to current issue.
   
   Whether could I add two code path here as a middle term solution? 
   - Step 1. Try directly use `Simplify` here, the most cases should be covered.
   - Step 2. If it fails unfortunately, try `canonical_simplify` first.
   
   For a long term solution to be more robust, I notice that there do exist 
rules to handle patterns like in your mentioned cases. But unfortunately, for 
example, if we have a cancel pattern `R(a - b) -> simplified`, current system 
could not ensure for `a + c - b` the pattern could be matched with associative 
rule, unless the term order is luckily changed (`canonical_simplify` sometimes 
achieve this). It seems that a O(n^2) summation term matching is required to 
solve this issue. 
   


-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to