Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Fix SSA conversion for SizeVar retention #16924

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

MasterJH5574
Copy link
Contributor

This PR fixes the var construction in IRConvertSSA, which always casts SizeVar to Var. This behavior leads to expr not being able to get simplified in the LowerIntrin pass later on. Specifically, if not using SizeVar, the LowerIntrin pass loses the information of the non-negative var information, and cannot simply a bunch of FloorDiv/FloorMod expressions.

One regression test for SplitHostDevice is added to ensure the retention of SizeVar. Adding the test in SplitHostDevice because this is where the SSA conversion is used.

This PR fixes the var construction in IRConvertSSA, which always casts
SizeVar to Var. This behavior leads to expr not being able to get
simplified in the LowerIntrin pass later on. Specifically, if not using
SizeVar, the LowerIntrin pass loses the information of the non-negative
var information, and cannot simply a bunch of FloorDiv/FloorMod
expressions.

One regression test for SplitHostDevice is added to ensure the retention
of SizeVar. Adding the test in SplitHostDevice because this is where
the SSA conversion is used.
@tqchen tqchen merged commit 39f2482 into apache:main Apr 25, 2024
18 of 19 checks passed
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.

None yet

2 participants