Skip to content

Conversation

@tqchen
Copy link
Member

@tqchen tqchen commented Jun 2, 2025

This PR updates the rewrite simplify logic to canonicalize mul-coefficient to rhs. This change is consistent with rest of the code base and allows better simplification of more cases. A test case of floormod with linear offset is added.

@tqchen
Copy link
Member Author

tqchen commented Jun 2, 2025

Thanks to @Ghosts381937, supersedes #17765

This PR updates the rewrite simplify logic to canonicalize mul-coefficient to rhs.
This change is consistent with rest of the code base and allows better simplification
of more cases. A test case of floormod with linear offset is added.

Co-authored-by: Ghosts381937 <[email protected]>
@tqchen
Copy link
Member Author

tqchen commented Jun 2, 2025

@tvm-bot rerun

@spectrometerHBH spectrometerHBH merged commit 0607484 into apache:main Jun 2, 2025
13 checks passed
Ghosts381937 added a commit to Ghosts381937/tvm that referenced this pull request Jul 17, 2025
* [ARITH] Canonicalize mul-coefficient to rhs

This PR updates the rewrite simplify logic to canonicalize mul-coefficient to rhs.
This change is consistent with rest of the code base and allows better simplification
of more cases. A test case of floormod with linear offset is added.

Co-authored-by: Ghosts381937 <[email protected]>

* Fix the grad testcase caused by the changed simplification behavior

---------

Co-authored-by: Ghosts381937 <[email protected]>
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
* [ARITH] Canonicalize mul-coefficient to rhs

This PR updates the rewrite simplify logic to canonicalize mul-coefficient to rhs.
This change is consistent with rest of the code base and allows better simplification
of more cases. A test case of floormod with linear offset is added.

Co-authored-by: Ghosts381937 <[email protected]>

* Fix the grad testcase caused by the changed simplification behavior

---------

Co-authored-by: Ghosts381937 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants