Hzfengsy opened a new pull request #7806:
URL: https://github.com/apache/tvm/pull/7806
This PR is the first part of the stage M1c, TensorIR upstreaming plan
(#7527) on lowering init block.
We just use `if` branch to replace the init block. e.g.
Before
```Python
with tir.block([16, 16, tir.reduce_axis(16)]) as [i, j ,k]:
with tir.init():
C[i, j] = tir.float32(0)
C[i, j] += A[i, k] * B[j, k]
```
After
```Python
with tir.block([16, 16, tir.reduce_axis(16)]) as [i, j ,k]:
if k == 0:
C[i, j] = tir.float32(0)
C[i, j] += A[i, k] * B[j, k]
```
Please note that we only provide the default behavior for lowering the init
part, which is not performent. We will provide primitives for users to manually
"decompose" init part.
cc @tqchen @junrushao1994 @jroesch @comaniac @jcf94
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]