[Mlir-commits] [mlir] [MLIR][TOSA] Update IfOp print/parse to support ranked condition tens… (PR #149791)
Yuvaraj Venkatesh
llvmlistbot at llvm.org
Tue Jul 22 08:48:54 PDT 2025
================
@@ -500,9 +500,37 @@ func.func @test_cond_if_input_list_mismatch_else_block_2(%arg0: tensor<f32>, %ar
// -----
+func.func @test_cond_if_input_list_mismatch_else_block_simple(%arg0: tensor<f32>, %arg1: tensor<f32>, %arg2: tensor<i1>) -> tensor<f32> {
+ // expected-error at +1 {{'tosa.cond_if' op require same number of values in 'else_graph' arguments (1) and 'input_list' (2)}}
+ %0 = tosa.cond_if %arg2 (%arg3 = %arg0, %arg4 = %arg1) : tensor<i1> (tensor<f32>, tensor<f32>) -> tensor<f32> {
+ %1 = tosa.add %arg3, %arg4 : (tensor<f32>, tensor<f32>) -> tensor<f32>
----------------
Yuvaraj-Venkatesh wrote:
@lhutton1 Thanks for the review.
I have modified the code to have block arguments in both then and else region.
https://github.com/llvm/llvm-project/pull/149791
More information about the Mlir-commits
mailing list