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
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.
You can refer https://github.com/dmlc/tvm/blob/45878ff2ab111b55448cf62e34bc58eb3e36b671/include/tvm/expr.h#L277
There several kinds of loops:
- DataPar: You can freely schedule them with any scheduling premitives.
- CommReduce: This is generated by
tvm.reduce
ortvm.sum
, which operates a reduction. - Ordered: something like sum[i] = sum[i-1] + k;
- Opaque: IIRC, after applying
xo, xi = split(x, 4)
,x
becomes 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.
1 Like