-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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] Allow starred expressions in TIR script #15404
Conversation
Small change in the evaluator to allow it to handle starred expressions (i.e. list/tuple splicing).
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 |
5 similar comments
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 |
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 |
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 |
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 |
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 |
An extension of apache#15404, which allowed starred expressions in the rhs of assignments (e.g. `T.decl_buffer(shape=[*dim, 128])`), this PR also enables starred expressions in the lhs of assignments (e.g. `for *spatial,reduction in T.grid(*A.shape)`).
I really like this, and it reduces some of the tedious parts of writing generic TIR functions. Playing around with it, I found a few more cases where it could be useful, and opened #15442 to extend the functionality to for-loops (e.g. |
An extension of apache#15404, which allowed starred expressions in the rhs of assignments (e.g. `T.decl_buffer(shape=[*dim, 128])`), this PR also enables starred expressions in the lhs of assignments (e.g. `for *spatial,reduction in T.grid(*A.shape)`).
* [TVMScript] Support starred indices in for-loop An extension of #15404, which allowed starred expressions in the rhs of assignments (e.g. `T.decl_buffer(shape=[*dim, 128])`), this PR also enables starred expressions in the lhs of assignments (e.g. `for *spatial,reduction in T.grid(*A.shape)`). * Fix single-argument indices * Updated test case for T.grid()
Small change in the evaluator to allow it to handle starred expressions (i.e. list/tuple splicing).