[TensorIR] CompareBufferRegion buffer region min mismatch. lhs->region[i + offset]=range(min=v_kw_i, ext=1)Range(0x55da9e5b0ac0) vs rhs->region[i]=range(min=vr, ext=1)Range(0x55da9e593100)

Hello,

I am trying to map the conv2d operation in TIR to my handwritten kernel through the tensorization operation. However, I get this error:

Error message: The stmt tir.Block#0 doesn't match the tensor intrin
The pattern attempting to be matched:
with T.block("res_update", no_realize=True):
    v_n_i = T.axis.spatial(4)
    v_p_i = T.axis.spatial(254)
    v_q_i = T.axis.spatial(254)
    v_m_i = T.axis.spatial(512)
    v_kh_i = T.axis.reduce(3)
    v_kw_i = T.axis.reduce(3)
    v_ic_i = T.axis.reduce(128)
    res = T.Buffer((4, 254, 254, 512), "int8")
    a_in = T.Buffer((4, 256, 256, 128), "int8")
    b_in = T.Buffer((3, 3, 128, 512), "int8")
    T.reads(res[v_n_i, v_p_i, v_q_i, v_m_i], a_in[v_n_i, v_p_i + v_kh_i, v_q_i + v_kw_i, v_ic_i], b_in[v_kw_i, v_kw_i, v_ic_i, v_m_i])
    T.writes(res[v_n_i, v_p_i, v_q_i, v_m_i])
    res[v_n_i, v_p_i, v_q_i, v_m_i] = res[v_n_i, v_p_i, v_q_i, v_m_i] + a_in[v_n_i, v_p_i + v_kh_i, v_q_i + v_kw_i, v_ic_i] * b_in[v_kw_i, v_kw_i, v_ic_i, v_m_i]
Does not match the tensorize description:
with T.block("", no_realize=True):
    vn = T.axis.spatial(4)
    vp = T.axis.spatial(254)
    vq = T.axis.spatial(254)
    vm = T.axis.spatial(512)
    vr = T.axis.reduce(3)
    vs = T.axis.reduce(3)
    vic = T.axis.reduce(128)
    Res = T.Buffer((4, 254, 254, 512), "int8", strides=("Res_s0", "Res_s1", "Res_s2", "Res_s3"), offset_factor=1)
    Inp = T.Buffer((4, 256, 256, 128), "int8", strides=("Inp_s0", "Inp_s1", "Inp_s2", "Inp_s3"), offset_factor=1)
    Wgt = T.Buffer((3, 3, 128, 512), "int8", strides=("Wgt_s0", "Wgt_s1", "Wgt_s2", "Wgt_s3"), offset_factor=1)
    T.reads(Res[vn, vp, vq, vm], Inp[vn, vp + vr, vq + vs, vic], Wgt[vr, vs, vic, vm])
    T.writes(Res[vn, vp, vq, vm])
    Res[vn, vp, vq, vm] = Res[vn, vp, vq, vm] + Inp[vn, vp + vr, vq + vs, vic] * Wgt[vr, vs, vic, vm]
CompareBufferRegion buffer region min mismatch. lhs->region[i + offset]=range(min=v_kw_i, ext=1)Range(0x55da9e5b0ac0) vs rhs->region[i]=range(min=vr, ext=1)Range(0x55da9e593100)
BlockNode read buffers regions do not match: op->reads=[res[v_n_i, v_p_i, v_q_i, v_m_i], a_in[v_n_i, v_p_i + v_kh_i, v_q_i + v_kw_i, v_ic_i], b_in[v_kw_i, v_kw_i, v_ic_i, v_m_i]] vs rhs->reads=[Res[vn, vp, vq, vm], Inp[vn, vp + vr, vq + vs, vic], Wgt[vr, vs, vic, vm]]

What is this error trying to tell me? The buffers all match with my expectations and seem to match between the description and the actual code.

I found a similar issue here which indicates that this a bug.