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

[ARITH] fix zero iter bug in arith #8494

Merged
merged 2 commits into from
Jul 18, 2021
Merged

[ARITH] fix zero iter bug in arith #8494

merged 2 commits into from
Jul 18, 2021

Conversation

spectrometerHBH
Copy link
Contributor

No description provided.

spectrometerHBH added 2 commits July 17, 2021 15:51
@tqchen
Copy link
Member

tqchen commented Jul 17, 2021

Thanks @spectrometerHBH , is it possible to also fix via other means? e.g. can we early simplify the zero iters and ignore them in sum

@junrushao junrushao self-assigned this Jul 17, 2021
@junrushao
Copy link
Member

I agree with Tianqi, we should simplify the zeros out

@spectrometerHBH
Copy link
Contributor Author

spectrometerHBH commented Jul 17, 2021

Actually, the bug is caused by simplifying the zero iters.

After simplifying, the left hand side of constraints (iter < bound) may only contain one IterSplit in IterSum.

We fuse the IterSum into one IterMark, and expect the fusing result to be IterSplit(IterMark(IterSum)). But if the IterSum only contain one IterSplit and we directly return the IterSplit, the result will be IterSplit(IterMark(Var)), which is not appropriate.

Also, We use a map from IterSum to IterMark to note down the correct bound induced by constraint. So we expect the source of IterMark to be an IterSum.

Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation! The PR looks good to me now

@junrushao junrushao merged commit 1534983 into apache:main Jul 18, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Sep 29, 2021
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
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.

3 participants