cyx-6 opened a new pull request, #13801:
URL: https://github.com/apache/tvm/pull/13801
This PR implements the syntax sugar of `T.match_buffer` for new TVMScript
printer. This syntax sugar will replace the `T.handle` in `T.prim_func`
arguments, with matched simple buffer. For example, it will change
```python
@T.prim_func
def func(a: T.handle, b: T.handle, c: T.handle):
A = T.match_buffer(a, [128], dtype="float32")
B = T.match_buffer(b, [128, 128], dtype="int32")
C = T.match_buffer(c, [128, 128, 128], dtype="uint8")
```
into
```python
@T.prim_func
def main(A: T.Buffer[(128,)], B: T.Buffer[(128, 128), "int32"], C:
T.Buffer[(128, 128, 128), "uint8"]):
T.evaluate(0)
```
--
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]