[Mlir-commits] [mlir] [mlir][linalg][test] Update `simplify-pack-unpack.mlir`. (PR #209011)

Jerry Shih llvmlistbot at llvm.org
Mon Jul 13 21:00:46 PDT 2026


================
@@ -61,21 +61,21 @@ func.func @single_last_inner_dim_packing_with_identity_outer_dims_perm(%arg0: te
 
 // -----
 
-// CHECK-LABEL: func.func @packing_with_outer_dims_perm(
+// CHECK-LABEL: func.func @negative_packing_with_outer_dims_perm(
 // CHECK-NOT:     tensor.expand_shape
 // CHECK:         linalg.pack
-func.func @packing_with_outer_dims_perm(%arg0: tensor<5x256xf32>) -> tensor<8x5x32xf32> {
+func.func @negative_packing_with_outer_dims_perm(%arg0: tensor<5x256xf32>) -> tensor<8x5x32xf32> {
   %empty = tensor.empty() : tensor<8x5x32xf32>
   %0 = linalg.pack %arg0 outer_dims_perm = [1, 0] inner_dims_pos = [1] inner_tiles = [32] into %empty : tensor<5x256xf32> -> tensor<8x5x32xf32>
   return %0 : tensor<8x5x32xf32>
 }
 
 // -----
 
-// CHECK-LABEL: func.func @single_first_inner_dim_packing(
+// CHECK-LABEL: func.func @negative_single_first_inner_dim_packing(
 // CHECK-NOT:     tensor.expand_shape
 // CHECK:         linalg.pack
-func.func @single_first_inner_dim_packing(%arg0: tensor<256x5xf32>) -> tensor<8x5x32xf32> {
+func.func @negative_single_first_inner_dim_packing(%arg0: tensor<256x5xf32>) -> tensor<8x5x32xf32> {
----------------
JerryShih wrote:

This one is the existed test case.
I think the name here is that there is only a single inner tile and the tiled dim is at first(0) dim.
I think the name `negative_packing_inner_dim` is so generic which can't show more info about this case.

The expand_shape op can't handle the following case which needs transpose.
```
tensor<256x5xf32> -> tensor<8x5x32xf32>
```

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


More information about the Mlir-commits mailing list