@@ -493,8 +493,7 @@ def foo(a: ti.template()):
493
493
assert a [i ] == 0
494
494
495
495
496
- @test_utils .test (print_preprocessed_ir = True )
497
- def test_static_grouped_for_break ():
496
+ def _test_static_grouped_for_break ():
498
497
n = 4
499
498
500
499
@ti .kernel
@@ -518,6 +517,18 @@ def foo(a: ti.template()):
518
517
assert a [i , j ] == 0
519
518
520
519
520
+ @test_utils .test (print_preprocessed_ir = True )
521
+ def test_static_grouped_for_break ():
522
+ _test_static_grouped_for_break ()
523
+
524
+
525
+ @test_utils .test (print_preprocessed_ir = True ,
526
+ real_matrix = True ,
527
+ real_matrix_scalarize = True )
528
+ def test_static_grouped_for_break_matrix_scalarize ():
529
+ _test_static_grouped_for_break ()
530
+
531
+
521
532
@test_utils .test (print_preprocessed_ir = True )
522
533
def test_static_for_continue ():
523
534
n = 10
@@ -540,8 +551,7 @@ def foo(a: ti.template()):
540
551
assert a [i ] == 3
541
552
542
553
543
- @test_utils .test (print_preprocessed_ir = True )
544
- def test_static_grouped_for_continue ():
554
+ def _test_static_grouped_for_continue ():
545
555
n = 4
546
556
547
557
@ti .kernel
@@ -563,6 +573,18 @@ def foo(a: ti.template()):
563
573
assert a [i , j ] == 3
564
574
565
575
576
+ @test_utils .test (print_preprocessed_ir = True )
577
+ def test_static_grouped_for_continue ():
578
+ _test_static_grouped_for_continue ()
579
+
580
+
581
+ @test_utils .test (print_preprocessed_ir = True ,
582
+ real_matrix = True ,
583
+ real_matrix_scalarize = True )
584
+ def test_static_grouped_for_continue_matrix_scalarize ():
585
+ _test_static_grouped_for_continue ()
586
+
587
+
566
588
@test_utils .test (print_preprocessed_ir = True )
567
589
def test_for_break ():
568
590
n = 4
@@ -1039,8 +1061,7 @@ def foo() -> ti.i32:
1039
1061
assert foo () == 123
1040
1062
1041
1063
1042
- @test_utils .test ()
1043
- def test_grouped_static_for_cast ():
1064
+ def _test_grouped_static_for_cast ():
1044
1065
@ti .kernel
1045
1066
def foo () -> ti .f32 :
1046
1067
ret = 0.
@@ -1050,3 +1071,13 @@ def foo() -> ti.f32:
1050
1071
return ret
1051
1072
1052
1073
assert foo () == test_utils .approx (10 )
1074
+
1075
+
1076
+ @test_utils .test ()
1077
+ def test_grouped_static_for_cast ():
1078
+ _test_grouped_static_for_cast ()
1079
+
1080
+
1081
+ @test_utils .test (real_matrix = True , real_matrix_scalarize = True )
1082
+ def test_grouped_static_for_cast_matrix_scalarize ():
1083
+ _test_grouped_static_for_cast ()
0 commit comments