Skip to content

Conversation

@Lunderberg
Copy link
Contributor

@Lunderberg Lunderberg commented May 25, 2022

Both the function tvm.tir.decl_buffer and the TVMScript T.match_buffer expression allow a PrimExpr to be passed as the buffer shape, which is interpreted as a 1-d buffer of that size. This allows the same behavior to be used in the T.Buffer syntactic sugar.

(e.g. A: T.Buffer[16, "float32"] instead of A: T.Buffer[(16,), "float32"])

cc @driazati

Both the function `tvm.tir.decl_buffer` and the TVMScript
`T.match_buffer` expression allow a `PrimExpr` to be passed as the buffer
shape, which is interpreted as a 1-d buffer of that size.  This allows
the same behavior to be used in the `T.Buffer` syntactic sugar.

(e.g. `A: T.Buffer[16, "float32"]` instead of `A: T.Buffer[(16,), "float32"`)
@Lunderberg Lunderberg requested a review from vinx13 May 25, 2022 14:59
@github-actions github-actions bot requested a review from driazati May 25, 2022 15:01
@driazati driazati removed their request for review May 25, 2022 17:50
@Lunderberg
Copy link
Contributor Author

Retriggering CI following #11456.

@github-actions github-actions bot requested a review from driazati May 25, 2022 19:13
@Lunderberg
Copy link
Contributor Author

Retriggering CI following tlc-pack/ci-packer#5.

@Lunderberg Lunderberg force-pushed the tvmscript_buffer_1d_sugar branch from 0925886 to 92e138e Compare May 27, 2022 13:30
@masahi masahi merged commit d0b3ec9 into apache:main May 30, 2022
@Lunderberg Lunderberg deleted the tvmscript_buffer_1d_sugar branch May 31, 2022 14:32
areusch pushed a commit that referenced this pull request Jun 1, 2022
This improves the parsing to avoid issues like in #11454

commit-id:53a06ab3

Co-authored-by: driazati <[email protected]>
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.

3 participants