I am working on a change that is related to tiling in Linalg (here). One of the tests seems to be hitting an assertion in folding of affine.min
operation. This is the IR
scf.for %arg3 = %c0 to %c1584 step %c264 {
scf.for %arg4 = %c0 to %c1584 step %c768 {
scf.for %arg5 = %c0 to %c1584 step %c768 {
%0 = affine.min affine_map<(d0) -> (768, -d0 + 1584)>(%arg5)
%1 = affine.min affine_map<(d0) -> (768, -d0 + 1584)>(%arg4)
...
scf.for %arg6 = %c0 to %4 step %c12 {
scf.for %arg7 = %c0 to %0 step %c8 {
scf.for %arg8 = %c0 to %1 step %c16 {
...
%11 = affine.min affine_map<()[s0, s1] -> (16, s1)>()[%c16, %1]
Seems like the folding of %11 = affine.min ...
operation checks for if the symbol isValidSymbol
which seems to be looking for (amongst other things) that the defining operation is within an AffineScope
which seems to be not the case here. I am not fully aware of how to get around this issue. Looking for some advice on this.
@bondhugula, @nicolasvasilache for inputs.