[Mlir-commits] [mlir] [mlir][linalg] Use ub.poison in data layout propagation if a packed operand requires padding. (PR #159467)
    Han-Chung Wang 
    llvmlistbot at llvm.org
       
    Fri Sep 19 10:13:05 PDT 2025
    
    
  
================
@@ -289,9 +290,11 @@ getOrCreatePackedViewOfOperand(OpBuilder &b, Location loc, PackInfo packInfo,
 
   auto empty = linalg::PackOp::createDestinationTensor(
       b, loc, opOperand->get(), innerTileSizes, innerDimsPos, outerDimsPerm);
-  auto packedOperand = linalg::PackOp::create(
-      b, loc, opOperand->get(), empty, innerDimsPos, innerTileSizes,
-      /*padding=*/std::nullopt, outerDimsPerm);
+  auto poison = ub::PoisonOp::create(
+      b, loc, getElementTypeOrSelf(opOperand->get().getType()));
----------------
hanhanW wrote:
For another example -- that I don't see in practice so far, which is just my hypothesis -- you may drop the padding value in this case:
- The inner tile size is 4.
- You have int range analysis that tells you the packing dimension size is a multiple of 4 (which is a dynamic shape).
https://github.com/llvm/llvm-project/pull/159467
    
    
More information about the Mlir-commits
mailing list