-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[TIR][Fix] Buffer slicing using index dtype as extent #13788
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
[TIR][Fix] Buffer slicing using index dtype as extent #13788
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
f7e7528 to
84a9f8c
Compare
cyx-6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for reporting and fixing this bug.
junrushao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, and would you like to revert the change to 3rdparty/cutlass? Seems like irrelevant
@junrushao Sorry my bad. I didn’t notice that... Will do later. |
84a9f8c to
f951dcc
Compare
| test_different_dtype_assignment_to_var() | ||
| b = 1 | ||
| test_var_capturing_order() | ||
| tvm.testing.main() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a = numpy.zeros((10, 10), dtype="int8") here is to test var capturing in #13640. I appreciate it if you could revert it and add a comment here.
[Fix] Buffer slicing using index dtype as extent
This PR fixes a bug of TIR Buffer
__getitem__on Python side.Whenever the
__getitem__parameter is a multi-dim slice, on non-slice dimension a Range will be created. Prior to this PR, that range will have int32 dtype in regardless of thestart, while the proper behavior is to generate the extent according to the dtype ofstartwhenstartis a PrimExpr.This PR fixes the issue and provides a regression test.