[Mlir-commits] [mlir] [mlir][tosa] Fold 'small' constant 1D concat operations (PR #128080)

Jack Frankland llvmlistbot at llvm.org
Thu Feb 27 08:01:50 PST 2025


================
@@ -91,3 +91,16 @@ func.func @partially_foldable(%arg0: tensor<1x1x8x8xf32>, %arg1: tensor<1x2x4x8x
 // CHECK:           %[[VAL_3:.*]] = tosa.concat %[[VAL_0]], %[[VAL_0]], %[[VAL_2]] {axis = 1 : i32} : (tensor<1x1x8x8xf32>, tensor<1x1x8x8xf32>, tensor<1x2x8x8xf32>) -> tensor<1x4x8x8xf32>
 // CHECK:           return %[[VAL_3]] : tensor<1x4x8x8xf32>
 // CHECK:         }
+
+// -----
----------------
FranklandJack wrote:

Can we add some neative tests here?

The conditions for this transformation are:
1. const slice
2. tensor of rank 1
3.  \< 6 dims in the output tensor

so I guess we could negative test these cases?

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


More information about the Mlir-commits mailing list