@@ -269,20 +269,6 @@ func.func @test_cond_if_simplified_form_not_isolated_from_above(%arg0: tensor<f3
269
269
270
270
// -----
271
271
272
- // Check isolated cond_if's are valid
273
- func.func @test_cond_if_isolated_from_above (%arg0: tensor <f32 >, %arg1: tensor <f32 >, %arg2: tensor <i1 >) -> tensor <f32 > {
274
- %0 = " tosa.cond_if" (%arg2 , %arg0 , %arg1 ) ({
275
- ^bb0 (%arg3: tensor <f32 >, %arg4: tensor <f32 >):
276
- tosa.yield %arg3 : tensor <f32 >
277
- }, {
278
- ^bb0 (%arg3: tensor <f32 >, %arg4: tensor <f32 >):
279
- tosa.yield %arg4 : tensor <f32 >
280
- }) : (tensor <i1 >, tensor <f32 >, tensor <f32 >) -> tensor <f32 >
281
- return %0 : tensor <f32 >
282
- }
283
-
284
- // -----
285
-
286
272
func.func @test_while_loop_cond_not_isolated_from_above (%arg0: tensor <i32 >, %arg1: tensor <i32 >, %arg2: tensor <f32 >) {
287
273
%0 = " tosa.const" () {values = dense <0 > : tensor <i32 >} : () -> tensor <i32 >
288
274
// expected-error@+1 {{'tosa.while_loop' op is not conformant to the TOSA specification. It requires the 'cond' region is isolated from above.}}
@@ -318,22 +304,3 @@ func.func @test_while_loop_body_not_isolated_from_above(%arg0: tensor<i32>, %arg
318
304
}) : (tensor <i32 >) -> (tensor <i32 >)
319
305
return
320
306
}
321
-
322
- // -----
323
-
324
- // Check isolated while_loops are valid
325
- func.func @test_while_loop_isolated_from_above (%arg0: tensor <f32 >, %arg1: tensor <i32 >) {
326
- %0 = " tosa.const" () {values = dense <0 > : tensor <i32 >} : () -> tensor <i32 >
327
- %1:3 = " tosa.while_loop" (%0 , %arg0 , %arg1 ) ({
328
- ^bb0 (%arg3: tensor <i32 >, %arg4: tensor <f32 >, %arg5: tensor <i32 >):
329
- %2 = " tosa.greater_equal" (%arg3 , %arg5 ) : (tensor <i32 >, tensor <i32 >) -> tensor <i1 >
330
- %3 = " tosa.logical_not" (%2 ) : (tensor <i1 >) -> tensor <i1 >
331
- " tosa.yield" (%3 ) : (tensor <i1 >) -> ()
332
- }, {
333
- ^bb0 (%arg3: tensor <i32 >, %arg4: tensor <f32 >, %arg5: tensor <i32 >):
334
- %2 = " tosa.const" () {values = dense <1 > : tensor <i32 >} : () -> tensor <i32 >
335
- %3 = " tosa.add" (%arg3 , %2 ) : (tensor <i32 >, tensor <i32 >) -> tensor <i32 >
336
- " tosa.yield" (%3 , %arg4 , %arg5 ) : (tensor <i32 >, tensor <f32 >, tensor <i32 >) -> ()
337
- }) : (tensor <i32 >, tensor <f32 >, tensor <i32 >) -> (tensor <i32 >, tensor <f32 >, tensor <i32 >)
338
- return
339
- }
0 commit comments