[mlir][Linalg] Add a transform.structured.pack operation
This revision introduces a `transform.structured.pack` operation to transform any Linalg operation to a higher-dimensional Linalg operation on packed operands. `tensor.pack` (resp. `tensor.unpack`) operations are inserted for the operands (resp. results) that need to be packed (resp. unpacked) according to the `packed_sizes` specification. At the moment, the packing operation always pads with `getZeroAttr` which will need to be adjusted depending on the consumers. Packing is limited to those dimensions that are indexed only by AffineDimExpr. Packing more advanced indexings requires modular arithmetic that is outside the scoped of a `linalg.generic` at the moment. Differential Revision: https://reviews.llvm.org/D141860
Loading
Please sign in to comment