rutkoor commented on PR #15901:
URL: https://github.com/apache/tvm/pull/15901#issuecomment-1857901972
Hi @Lunderberg,
@kparzysz-quic may not continue to work on this PR, I will try to complete
the changes suggested in this PR.
If I understood the above suggestion, you are proposing generic
loop-partitioning scheduling primitive rather than peeling just tail
iterations. Can you please confirm, if you are looking into something like
below example?
```
for iv in range(n):
a[i] = b[i] + c[i]
```
Given the above loop, if we want to partition it into three parts, with head
iterations as 4, body iterations as n - 4 - 5 and tail iterations as 5, we can
use a scheduling primitive like, `sch.partition_loop(iv, 4, 5)`, where `iv` is
a loop iteration variable.
```
for iv in range(4):
a[i] = b[i] + c[i]
for iv in range(4, n-5):
a[i] = b[i] + c[i]
for iv in range(n-5, n):
a[i] = b[i] + c[i]
```
The design(`sch.partition_loop(iv, head_iter, tail_iter)`) that I am
thinking is, to have head_iterations and tail_iterations as arguments to the
sch primitive, which will give fine control to users to peel from start/end of
loops.
Please confirm the design, so that I will go ahead and start working on the
remaining changes.
Thanks
--
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]