Skip to content

Conversation

@junrushao
Copy link
Member

Previously there are two equivalent ways of declaring a buffer in TVMScript:

buffer = T.buffer_decl(...)
buffer = T.Buffer(...)

The two approaches are aliases to each other and are essentially the same in implementation. Therefore, this PR encourages to use T.Buffer as the recommended approach as it's a bit shorter. Meanwhile, T.buffer_decl will continue to be valid in TVMScript, but a deprecation warning will be emitted if its used.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Feb 13, 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

@junrushao junrushao marked this pull request as ready for review February 13, 2023 01:32
@junrushao junrushao force-pushed the feature/2023-02-12/buffer_decl_to_buffer branch from 1138796 to f5b338b Compare February 13, 2023 01:34
@junrushao
Copy link
Member Author

CC: @cyx-6

@junrushao junrushao force-pushed the feature/2023-02-12/buffer_decl_to_buffer branch from f5b338b to efe5cec Compare February 13, 2023 02:04
Previously there are two equivalent ways of declaring a buffer in
TVMScript:

```python
buffer = T.buffer_decl(...)
buffer = T.Buffer(...)
```

The two approaches are aliases to each other and are essentially the
same in implementation. Therefore, this PR encourages to use `T.Buffer`
as the recommended approach as it's a bit shorter. Meanwhile,
`T.buffer_decl` will continue to be valid in TVMScript, but a
deprecation warning will be emitted if its used.
@junrushao junrushao force-pushed the feature/2023-02-12/buffer_decl_to_buffer branch from efe5cec to 48adf3c Compare February 13, 2023 02:34
Copy link
Contributor

@cyx-6 cyx-6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cyx-6 cyx-6 merged commit bea4919 into apache:main Feb 13, 2023
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