LeiWang1999 opened a new pull request, #18319:
URL: https://github.com/apache/tvm/pull/18319
For example:
```python
x = tir.Var("x", "float32")
ry = x / 27
sy = ana.rewrite_simplify(ry)
```
In previous versions, the division would be rewritten as `x * T.float32(1 /
27)`, which could lead to unexpected behavior.
This commit removes the special-case rule for rewriting division by a
constant float in `RewriteSimplifier`.
Additionally, it adds a new test to verify the behavior of float-division
simplification, ensuring divisions are preserved as-is instead of being
rewritten into multiplications.
Related discussion:
https://discuss.tvm.apache.org/t/discuss-is-constant-division-to-multiplication-rewrite-in-tvm-necessary/18615
--
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]