-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Description
- The simplifier does not simplify
(y - x) - y. Interestingly,(y - x) - y < 0is simplified, but(y - x) - y > 0is not:x = tvm.var('x') y = tvm.var('y') print(tvm.ir_pass.Simplify((y - x) - y)) print(tvm.ir_pass.Simplify((y - x) - y > 0)) print(tvm.ir_pass.Simplify((y - x) - y < 0)) Output: ((y - x) - y) (0 < ((y - x) - y)) (0 < x)CanonicalSimplifyworks well on this example though. - The simplifier rewrites
(3*x + y)/3intox + (y/3). Since tvm uses C/C++ truncated division instead of flooring or euclidean division, this is wrong (e.g.x = 1, y = -1). Recently there was a related issue here. However, instead of disabling another simplification rule I would suggest discussing another option: using Euclidean division in TVM, since the Euclidean definition has some advantages regarding program transformations, and it was originally used in Halide.
Metadata
Metadata
Assignees
Labels
No labels