[llvm] [mlir] [mlir][tensor] Fold linalg transpose with tensor pack (PR #74206)

Prathamesh Tagore via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 9 00:36:35 PST 2023


meshtag wrote:

> We should match transpose op for linalg.generic form as well. Can you add a isTranspose(linalg::LinalgOp op) util to [Linalg/Utils/Utils.h/cpp](https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Linalg/Utils/Utils.cpp)?

What exactly do we do here?

Do we detect and fold `linalg.generic` ops who are only doing transpose? 
                                                                OR 
Do we fold the transpose part from a `linalg.generic` op which can be doing multiple other things as well (for ex. matric multiplication)?

https://github.com/llvm/llvm-project/pull/74206


More information about the llvm-commits mailing list