tlc-pack / relax

Apache License 2.0
193 stars 58 forks source link

[Cherry-Pick][Fix][Arith] Simplification starts with canonical (apache/tvm#13875) #404

Closed MasterJH5574 closed 1 year ago

MasterJH5574 commented 1 year ago

This PR is a cherry-pick of apache/tvm#13875


This PR updates the order of arithmetic analyzer simplification, by adding a stage of canonical simplification at the very beginning so that every simplification always starts with a canonical round. This is because the rewrite simplification may destroy some PrimExpr property that the canonical simplification can make use of. Therefore, adding the canonical one in the front can maximize the use of canonical simplification.