[Mlir-commits] [mlir] [mlir][linalg] Fix UBSan division-by-zero in PackOp folding (PR #186271)
Mehdi Amini
llvmlistbot at llvm.org
Wed Mar 25 05:28:58 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> {
----------------
joker-eph wrote:
Also other are prefixed `no`, like `@no_infer_pack_shape`: should it be `@negative_infer_pack_shape`?
https://github.com/llvm/llvm-project/pull/186271
More information about the Mlir-commits
mailing list