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

Zhuoran Yin llvmlistbot at llvm.org
Mon Nov 25 07:25:53 PST 2024


================
@@ -295,7 +296,7 @@ FailureOr<LowerPackResult> linalg::lowerPack(RewriterBase &rewriter,
       llvm::interleaveComma(stripMinedShape, DBGS() << "stripMinedShape: ");
       DBGSNL(); DBGS() << "collapsed type: " << collapsed; DBGSNL(););
 
-  if (packOp.isLikePad()) {
+  if (allowInsertSliceLowering && packOp.isLikePad()) {
----------------
jerryyin wrote:

Late to the discussion, here's my opinios:
 - `LowerPad` doesn't convey the information that it is insert slice we are trying to get control with. Also, it can be confusing to the user that with `LowerPad` turned on, it can still not lower like a pad op.
 - I like the `lowerPadLikeWithInsertSlice` better than my original naming. Will amend.


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


More information about the Mlir-commits mailing list