Skip to content

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
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