File tree Expand file tree Collapse file tree 1 file changed +16
-11
lines changed
backends/xnnpack/test/ops Expand file tree Collapse file tree 1 file changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,22 @@ def forward(self, x):
2020 return z
2121
2222 def _test_ceil (self , inputs ):
23- (
24- Tester (self .Ceil (), inputs )
25- .export ()
26- .check_count ({"torch.ops.aten.ceil.default" : 1 })
27- .to_edge_transform_and_lower ()
28- .check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
29- .check_not (["executorch_exir_dialects_edge__ops_aten_ceil_default" ])
30- .to_executorch ()
31- .serialize ()
32- .run_method_and_compare_outputs ()
33- )
23+ for legacy_mode in (True , False ):
24+ tester = Tester (self .Ceil (), inputs )
25+ tester .export ()
26+ tester .check_count ({"torch.ops.aten.ceil.default" : 1 })
27+
28+ if legacy_mode :
29+ tester .to_edge ()
30+ tester .partition ()
31+ else :
32+ tester .to_edge_transform_and_lower ()
33+
34+ tester .check_count ({"torch.ops.higher_order.executorch_call_delegate" : 1 })
35+ tester .check_not (["executorch_exir_dialects_edge__ops_aten_ceil_default" ])
36+ tester .to_executorch ()
37+ tester .serialize ()
38+ tester .run_method_and_compare_outputs ()
3439
3540 def test_fp16_ceil (self ):
3641 inputs = (
You can’t perform that action at this time.
0 commit comments