[TIR] Allow starred expressions in TIR script#15404
[TIR] Allow starred expressions in TIR script#15404kparzysz-quic merged 1 commit intoapache:mainfrom
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).