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

[TIR] Allow starred expressions in TIR script #15404

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

kparzysz-quic
Copy link
Contributor

Small change in the evaluator to allow it to handle starred expressions (i.e. list/tuple splicing).

Small change in the evaluator to allow it to handle starred expressions
(i.e. list/tuple splicing).
@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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
@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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

@tvm-bot
Copy link
Collaborator

tvm-bot commented Jul 25, 2023

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

@kparzysz-quic kparzysz-quic merged commit 304aa1e into apache:main Jul 25, 2023
@kparzysz-quic kparzysz-quic deleted the starred-expressions branch July 25, 2023 21:14
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Jul 31, 2023
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)`).
@Lunderberg
Copy link
Contributor

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. for *spatial,reduction in T.grid(*buf.shape)).

Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Aug 2, 2023
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)`).
tqchen pushed a commit that referenced this pull request Aug 2, 2023
* [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()
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.

4 participants