cyx-6 opened a new pull request, #13813: URL: https://github.com/apache/tvm/pull/13813
This PR implements the syntax sugar of `T.allocate` with `T.decl_buffer` for new TVMScript printer. This syntax sugar will skip the `T.allocate`, when its body is a matched `T.decl_buffer`, and the `Var` defined in `T.allocate` is only used in that `T.decl_buffer`. For example, it will change ```python buffer_data = T.allocate([128, 128]) buffer = T.decl_buffer([128, 128], data=buffer_data) ``` into ```python buffer = T.decl_buffer([128, 128]) ``` but keep the following `T.allocate` unchanged: ```python buffer_data = T.allocate([128, 128]) buffer_0 = T.decl_buffer([128, 128], data=buffer_data) buffer_1 = T.decl_buffer([128, 128], data=buffer_data) ``` and ```python buffer_data = T.allocate([128, 128]) buffer = T.decl_buffer([256, 256], data=buffer_data) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
