[mlir][linalg] Enable propagation of pack/unpack ops through non-elementwise
Allows pack propagation through non-elementwise generics as long as all tiled dimensions have parallel iterator types and are only indexed with affine dim expressions by any of the operands. This enables unpack propagation cases where the result type is different from the current unpack destination tensor and thus motivates a similar helper as the for pack for creating a destination tensor based on pack information. Outer dim permutations are allowed to permute reduction dims, however remains unsupported for non-affine dim indexing map results. Additionally ops with gather semantics now explicitly prohibit propagation. Pack/unpack propagation through reductions may not always be beneficial so user control over propagation decisions is made available through a control function similar to the one for fusion. Differential Revision: https://reviews.llvm.org/D147508
Loading
Please sign in to comment