[all-commits] [llvm/llvm-project] b9d6cb: [MLIR] Folding unpack and pack sequence in data la...
Zhuoran Yin via All-commits
all-commits at lists.llvm.org
Wed May 7 08:15:03 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b9d6cbd4dc1def3f15b7d5ebb8cb4714bdad22bf
https://github.com/llvm/llvm-project/commit/b9d6cbd4dc1def3f15b7d5ebb8cb4714bdad22bf
Author: Zhuoran Yin <zhuoryin at amd.com>
Date: 2025-05-07 (Wed, 07 May 2025)
Changed paths:
M mlir/lib/Dialect/Linalg/Transforms/DataLayoutPropagation.cpp
M mlir/test/Dialect/Linalg/data-layout-propagation.mlir
Log Message:
-----------
[MLIR] Folding unpack and pack sequence in data layout propagation from padded domain (#138332)
In `DataLayoutPropagation` patterns, it can populate sequence of unpack
op followed by pack op. Such sequence tend to disrupt tiling and can be
optimized. This is especially true for pack and unpack in padded values.
The idea of this patch is to optimize the propagation by never creating
the unpack + pack in cases where the padding value does not matter for
the op that is being propagated through. We can optimize the unpack/pack
pair away from in particular `PushDownUnPackOpThroughGenericOp` pattern.
If the operand of the generic op happen to come from an unpack, there's
no need to create new packs of the generic operand. We can fold the
unpack -> pack sequence and use the operand from the original source of
the unpack op.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list