[Mlir-commits] [mlir] [mlir][tensor] Fold producer linalg transpose with consumer tensor pack (PR #75658)
lorenzo chelini
llvmlistbot at llvm.org
Mon Dec 18 01:10:04 PST 2023
================
@@ -21,6 +21,57 @@ static bool areAllConstantIntValue(ArrayRef<OpFoldResult> ofrs, int64_t value) {
ofrs, [&](OpFoldResult ofr) { return isConstantIntValue(ofr, value); });
}
+/// Helper function to generate an equivalent permutation map for
+/// `linalg.transpose` and `tensor.pack` which will be used after their folding
+/// into a `tensor.pack`.
+static bool getRemappedPermutationForTransposeAndPack(
----------------
chelini wrote:
I would like to understand a bit better why we have such complexity for `FoldConsumerPackWithProducerLinalgTransposeOp`; in such cases, to me, it is a simple `applyPermutation` on top of the transpose permutation based on outer dims perm, inner tiles and tiles will remain the same.
https://github.com/llvm/llvm-project/pull/75658
More information about the Mlir-commits
mailing list