LeiWang1999 commented on PR #18319:
URL: https://github.com/apache/tvm/pull/18319#issuecomment-3306403492

   I think we should have a further discussion, because some of the 
constant‑folding and algebraic rewrites may also introduce similar issues. 
Examples include:
   
   - `(x * c1) * c2 → x * (c1 * c2)`
   - `(x / c1) / c2 → x / (c1 * c2)` (with correct division semantics)  
   - `(x * c1) / c2` simplified if `c1` divisible by `c2`, or vice versa.
   - `(x / c1) + c2` normalized into a single division when possible.
   - `(y + z) * x → y * x + z * x`  
   - `(x + c1) * c2 → x * c2 + c1 * c2`
   - `y*x + z*x → (y+z) * x`
   
   
   However, these rewrites are important for optimization and performance, I 
think we should consider introducing a deterministic switch or similar option 
that can disable these transformations when strict, this pr should be closed.
   


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