[Mlir-commits] [mlir] [mlir][tensor] Generalize/restrict `GeneralizeOuterUnitDimsPackOpPattern` (PR #114315)

Andrzej WarzyƄski llvmlistbot at llvm.org
Wed Nov 6 01:02:39 PST 2024


================
@@ -149,19 +211,19 @@ func.func @simple_CHW_to_CHWhwc(%arg0: tensor<3x5x7xf32>, %arg1: tensor<1x1x1x5x
 
 // -----
 
-func.func @simple_KCRS_to_KRSCsr(%arg0: tensor<3x1x32x8xf32>, %arg1: tensor<3x1x1x1x8x32xf32>) -> tensor<3x1x1x1x8x32xf32> {
-  %0 = tensor.pack %arg0 outer_dims_perm = [0, 2, 3, 1] inner_dims_pos = [3, 2] inner_tiles = [8, 32] into %arg1 : tensor<3x1x32x8xf32> -> tensor<3x1x1x1x8x32xf32>
-  return %0 : tensor<3x1x1x1x8x32xf32>
----------------
banach-space wrote:

> Actually, I don't see anything in this PR that restricts the pattern to fail on this case. Did you mean to update the matching logic too?

I did, thanks for catching this. Sending an update shortly.

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


More information about the Mlir-commits mailing list