tensorflow / mlir

"Multi-Level Intermediate Representation" Compiler Infrastructure
1.73k stars 257 forks source link

subview op of mixed shape #249

Open bondhugula opened 4 years ago

bondhugula commented 4 years ago

Subview op's with mixed shape (static and dynamic dimensions) currently parse and verify correctly. This is inconsistent given the number of size values that are taken as input. (In the example below, the size of the 2nd dimension of the subview would be undefined -- 8 as per the shape but %arg as per the op that creates the memref).

#map = (d0, d1, d2)[s0, s1, s2] -> (d0 * s2 + d1 * s1 + d2 + s0)

%sv = std.subview %m[%c0, %c0, %c0][%c1, %arg, %c1][%c1, %c1, %c1] : memref<?x8x?xf32> to memref<?x8x?xf32, #map>
MaheshRavishankar commented 4 years ago

Thanks Uday. There is a change to the SubViewOp specification (that should land in github soon). Though that change still missed this case. Will fix this. Thanks!

MaheshRavishankar commented 4 years ago

This should be fixed by 750617c8d1faaba503b3f1c288d305ae7525c035