When vector unrolling with reminder, I find that unroll do nothing.
Such as unroll <2x128xf32> with native shape={1,65}:
func.func @test_add(%arg0: tensor<2x128xf32>, %arg1: tensor<2x128xf32>) -> tensor<2x128xf32> {
%c0 = arith.constant 0 : index
%cst = arith.constant 0.000000e+00 : f32
%0 = tensor.empty() : tensor<2x128xf32>
%1 = vector.transfer_read %arg0[%c0, %c0], %cst {in_bounds = [true, true]} : tensor<2x128xf32>, vector<2x128xf32>
%2 = vector.transfer_read %arg1[%c0, %c0], %cst {in_bounds = [true, true]} : tensor<2x128xf32>, vector<2x128xf32>
%3 = arith.addf %1, %2 : vector<2x128xf32>
%4 = vector.transfer_write %3, %0[%c0, %c0] {in_bounds = [true, true]} : vector<2x128xf32>, tensor<2x128xf32>
return %4 : tensor<2x128xf32>
}
I’m wondering if VectorUnroll does any special handling for situations where there is a remainder?