[Mlir-commits] [mlir] [mlir][tosa] Add more verifiers for the following operators (PR #127923)

Luke Hutton llvmlistbot at llvm.org
Thu Feb 27 01:33:20 PST 2025


================
@@ -207,6 +205,14 @@ func.func @test_pad_io_rank_mismatch(%arg0: tensor<13x21xf32>) {
 
 // -----
 
+func.func @test_concat_input_rank_mismatch(%arg0: tensor<1x2x3xf32>, %arg1: tensor<1x2xf32>) -> tensor<2x2x3xf32> {
+  // expected-error at +1 {{'tosa.concat' op expect all operands to have the same rank, but got 3 vs 2 on operands 0 and 1}}
+  %0 = tosa.concat %arg0, %arg1 {axis = 0 : i32} : (tensor<1x2x3xf32>, tensor<1x2xf32>) -> tensor<2x2x3xf32>
+  return %0 : tensor<2x2x3xf32>
+}
+
+// -----
+
----------------
lhutton1 wrote:

Seems like there are some missing tests for concat here e.g. test concat with no inputs, test out of range axis

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


More information about the Mlir-commits mailing list