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] Convert BufferSlice to BufferLoad when used as range/loop start and end #10370

Merged
merged 6 commits into from Feb 25, 2022

Conversation

yzh119
Copy link
Member

@yzh119 yzh119 commented Feb 24, 2022

A quick fix of the parser issue mentioned in #10327 .
Ranges and loops require start and stop to be PrimExpr, however, BufferSlice is not always scalar so it's not a PrimExpr.
This PR performs the transformation.

A deeper question is should we make BufferSlice a PrimExpr?

CC @MasterJH5574 @Hzfengsy

Copy link
Contributor

@MasterJH5574 MasterJH5574 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you Zihao!

A deeper question is should we make BufferSlice a PrimExpr?

cc @spectrometerHBH @Hzfengsy. Could you guys reason about it 👀 ?

@junrushao junrushao merged commit 920654c into apache:main Feb 25, 2022
@junrushao
Copy link
Member

Thanks @yzh119!!

junrushao pushed a commit that referenced this pull request Mar 13, 2022
This is a tiny fix on the roundtrip test, the case test I introduced in #10370 doesn't use `tvm.testing.parameter`.
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
…nge/loop start and end (apache#10370)

A quick fix of the parser issue mentioned in apache#10327 .
Ranges and loops require `start` and `stop` to be PrimExpr, however, `BufferSlice` is not always scalar so it's not a `PrimExpr`.
This PR performs the transformation.
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
This is a tiny fix on the roundtrip test, the case test I introduced in apache#10370 doesn't use `tvm.testing.parameter`.
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

3 participants