[MLIR] Fold outer dims permutation to pack when propagating
authorLorenzo Chelini <l.chelini@icloud.com>
Sun, 8 Jan 2023 13:04:18 +0000 (14:04 +0100)
committerLorenzo Chelini <l.chelini@icloud.com>
Fri, 13 Jan 2023 15:11:44 +0000 (16:11 +0100)
commitd7904a702fe80e482b7fbb132c46863afd6eb3be
treed2aec791c31204fd1c29f1a5c6422763783e2ad8
parent0a4d3eae335c1d4dc5bd9a440af4b66ccb9d0084
[MLIR] Fold outer dims permutation to pack when propagating

Instead of folding the transpose into the linalg.generic keep the
transposition in the packing operation, effectively making the
linalg.generic transparent to the propagation. Additionally, if the init
operand of the generic has users pack the init and pass it as the
operand to the generic.

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D141483
mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
mlir/test/Dialect/Linalg/data-layout-propagation.mlir