tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Arith][SVE] Add rewrite rules for indices split by scalable expressions

Open Anndrey24 opened this issue 1 year ago • 1 comments

This commit introduces rewrite rules for indices which can arise from splitting axes by scalable factors (e.g. xo, xi = sch.split(x, factors = [None, 8 * T.vscale()])):

(v_x_o * T.Cast("int64", T.vscale()) * T.int64(8) + v_x_i) // (T.Cast("int64", T.vscale()) * T.int64(8)) == v_x_o
(v_x_o * T.Cast("int64", T.vscale()) * T.int64(8) + v_x_i) % (T.Cast("int64", T.vscale()) * T.int64(8)) == v_x_i

The rewrites help prove checks needed by sch.tensorize() (e.g. CompareBufferRegion).

cc @ekalda @lhutton1

Anndrey24 avatar May 30 '24 10:05 Anndrey24

cc @Lunderberg

lhutton1 avatar May 30 '24 20:05 lhutton1

We decided to roll back to the initial version of this patch since a large number of Relax tests fail when division by zero is disabled in the rewrite rules (so dealing with this is out of scope for this patch).

ekalda avatar Jun 07 '24 14:06 ekalda

Thanks @Anndrey24!

ekalda avatar Jun 07 '24 14:06 ekalda