Hzfengsy commented on pull request #10420:
URL: https://github.com/apache/tvm/pull/10420#issuecomment-1056217935
Thanks, @yzh119 for pointing this out. On the other side, can we somehow
determine `outer` is a complete block?
By this approach, we may meet another case that we should take care of.
```python
for i, j in T.grid(16, 16):
with T.block("outer_1"):
vi, vj = T.axis.remap("SS", [i, j])
for k, l in T.grid(16, 16):
with T.block("inner_1"):
vk, vl = T.axis.remap("SR", [k, l])
with T.init():
b[vi, vj, vk] = 0.0
b[vi, vj, vk] = b[vi, vj, vk] + a[vi, vj, vk, vl]
with T.block("outer_2"):
vi, vj = T.axis.remap("SS", [i, j])
for k, l in T.grid(16, 16):
with T.block("inner_2"):
vk, vl = T.axis.remap("SR", [k, l])
with T.init():
b[vi, vj, vk] = 0.0
b[vi, vj, vk] = b[vi, vj, vk] + a[vi, vj, vk, vl]
```
`outer_1` and `outer_2` are not `complete block` or `reduction block`, while
`inner_1` and `inner_2` are both reduction blocks of its scope. However, in
this case, we cannot simply bind the thread index.
--
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]