tqchen commented on PR #15264:
URL: https://github.com/apache/tvm/pull/15264#issuecomment-1866383178

   Previously, we would like to have option that preserves trivial simplify 
(simplifies iterator of range 1 to zero).
   
   See implementation here 
https://github.com/apache/tvm/blob/main/src/arith/ir_mutator_with_analyzer.cc#L52
   
   Running `SimplifyNonTrivialExpr`  before means we cannot have the 
non-trivial option. I think it might be fine to update  
IterMapSimplifyWithContext  to include`SimplifyNonTrivialExpr` but still 
preserve the non-trivial option. 
   
   I thin the best approach would be to enhance IterMapSimplify to handle this 
case, since this involves affine map transformation and the best case we don;t 
rely on other simplifier.
   
   We can can see `(vi * 2 + vj // 8) // 16` should be readily transformed to 
`(vi // 8 + vj // 128)`, my suspect is that if you apply IterMap simplify again 
on the result it should also work (maybe some intermediate values did not 
further simplifes). Good to dig a bit what happens in this case without relying 
on other simplfier(so it have potential to work for future symbolic case)
   
   
   
   


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