For the supported schedule reorder and fuse, is it possible to keep the results right automatically like tvm.compute? And is it possible to support other schedule such as compute_at？ If not, what’s the restriction ？3q @were
[Hybrid Script] Is there possibility to support most schedule and keep results right in hybrid script?
I believe mostly they are semantically correct.
Say “mostly”, because you need to know something about the implementation details of how schedule is applied on the IR.
There several kinds of loops:
- DataPar: You can freely schedule them with any scheduling premitives.
- CommReduce: This is generated by
tvm.sum, which operates a reduction.
- Ordered: something like sum[i] = sum[i-1] + k;
- Opaque: IIRC, after applying
xo, xi = split(x, 4),
xbecomes opaque. You can no longer play anything on it.
- Unrolled/Vectorized/Parallelized/Tensorized: loop levels manipulated by the corresponding premitive.
For now, I did not write a pass to differentiate 1/2/3. I regard them as all kind 1, which is true in most cases I believe.