Sometimes, we need to split the tensor with overlapped data, for example, split featuremap by H/W axis in conv kernel.
Here is the simple case: A1 = A, the size of 1-D tensor A is 10, we want use it for A1 loading in 2 times, then it should be splitted by 2, currently we can use “split(s[A1].op.axis[0], nparts=2)”. But we want to copy 6 elements every times with 2 overlapped elements. Can we enhance the Split as “split(s[A1].op.axis[0], nparts=2, overlap=2)”, and get the loop as below:
for(i=0; i < 2; i ++)
{
for (j=0; j<6; j ++)
{
if(likely(i>0))
{
A1[i*2 + j] = A[i*2 + j - 2]
}
else
{
A1[i*2 + j] = A[i*2 + j]
}
}
}
Is there another solution for the requirement? I look into the code, if enhance the split, we also need to update the size of A1 to 12, do u think it need to change a lot in TVM or not?