[Mlir-commits] [mlir] [MLIR] Add allow Insert/extract slice option to pack/unpack op (PR #117340)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Dec 9 01:20:03 PST 2024


================
@@ -0,0 +1,121 @@
+// RUN: mlir-opt %s --transform-interpreter --split-input-file -canonicalize | FileCheck %s
+
+// For pack op, we use lowerPadLikeWithInsertSlice = false to ensure no insert_slice is generated.
+// This allows linalg.transpose to be fused as a producer operation. Alternatively, without this attribute
+// insert_slice will be generated and fusion blocked.
+
+module {
+  // CHECK-label: func @fuse_pack_as_producer
+  // CHECK:       scf.forall {{.*}} {
+  // CHECK:         linalg.transpose
----------------
banach-space wrote:

Btw, this will basically copy `linalg.transpose` inside `scf.forall` - what makes this beneficial? 

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


More information about the Mlir-commits mailing list