[Mlir-commits] [mlir] [mlir][linalg] Fix UBSan division-by-zero in PackOp folding (PR #186271)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Wed Mar 25 06:19:25 PDT 2026
================
@@ -1451,6 +1451,24 @@ func.func @fold_pack_constant_splat(%dest : tensor<4x8x8x32xf32>) -> tensor<4x8x
// -----
+// Zero tile size: pack must not be folded into expand_shape.
+// CHECK-LABEL: func.func @pack_zero_tile_not_folded
+// CHECK-NOT: tensor.expand_shape
+// CHECK: linalg.pack
+func.func @pack_zero_tile_not_folded(%A: tensor<7x16xi32>) -> tensor<1x16x?x1xi32> {
----------------
banach-space wrote:
> Also other are prefixed no, like @no_infer_pack_shape: should it be @negative_infer_pack_shape?
All of the above would be fine, I only ask for consistency within a particular file. What you did is perfect, thanks for tidying that up!
https://github.com/llvm/llvm-project/pull/186271
More information about the Mlir-commits
mailing list