@@ -230,7 +230,7 @@ def test_bitwise_and_scalar_tosa_INT(test_data: input_t2):
230230
231231
232232@common .parametrize ("test_data" , And ().test_data_non_bool )
233- def test_bitwise_and_tensor_u55_INT (test_data : input_t2 ):
233+ def test_bitwise_and_tensor_u55_INT_not_delegated (test_data : input_t2 ):
234234 # Tests that we don't delegate these ops since they are not supported on U55.
235235 pipeline = OpNotSupportedPipeline [input_t2 ](
236236 And (),
@@ -243,16 +243,16 @@ def test_bitwise_and_tensor_u55_INT(test_data: input_t2):
243243
244244
245245@common .parametrize ("test_data" , AndScalar .test_data )
246- def test_bitwise_and_scalar_u55_INT (test_data : input_t2 ):
247- # There will be one full op which will be delegated.
248- num_delegates = 1
249- num_exir = 0
246+ def test_bitwise_and_scalar_u55_INT_not_delegated (test_data : input_t2 ):
247+ # There will be one full op which will be delegated, unless it outputs boolean .
248+ test_input = test_data ()
249+ num_delegates = 0 if test_input [ 0 ]. dtype == torch . bool else 1
250250 pipeline = OpNotSupportedPipeline [input_t2 ](
251251 AndScalar (),
252- test_data () ,
252+ test_input ,
253253 {
254254 AndScalar .exir_op : 1 ,
255- "executorch_exir_dialects_edge__ops_aten_full_default" : num_exir ,
255+ "executorch_exir_dialects_edge__ops_aten_full_default" : 1 - num_delegates ,
256256 },
257257 num_delegates ,
258258 quantize = True ,
@@ -437,7 +437,7 @@ def test_bitwise_xor_scalar_tosa_INT(test_data: input_t2):
437437
438438
439439@common .parametrize ("test_data" , Xor ().test_data_non_bool )
440- def test_bitwise_xor_tensor_u55_INT (test_data : input_t2 ):
440+ def test_bitwise_xor_tensor_u55_INT_not_delegated (test_data : input_t2 ):
441441 # Tests that we don't delegate these ops since they are not supported on U55.
442442 pipeline = OpNotSupportedPipeline [input_t2 ](
443443 Xor (),
@@ -450,16 +450,16 @@ def test_bitwise_xor_tensor_u55_INT(test_data: input_t2):
450450
451451
452452@common .parametrize ("test_data" , XorScalar .test_data )
453- def test_bitwise_xor_scalar_u55_INT (test_data : input_t2 ):
454- # There will be one full op which will be delegated.
455- num_delegates = 1
456- num_exir = 0
453+ def test_bitwise_xor_scalar_u55_INT_not_delegated (test_data : input_t2 ):
454+ # There will be one full op which will be delegated, unless it outputs boolean .
455+ test_input = test_data ()
456+ num_delegates = 0 if test_input [ 0 ]. dtype == torch . bool else 1
457457 pipeline = OpNotSupportedPipeline [input_t2 ](
458458 XorScalar (),
459- test_data () ,
459+ test_input ,
460460 {
461461 XorScalar .exir_op : 1 ,
462- "executorch_exir_dialects_edge__ops_aten_full_default" : num_exir ,
462+ "executorch_exir_dialects_edge__ops_aten_full_default" : 1 - num_delegates ,
463463 },
464464 num_delegates ,
465465 quantize = True ,
@@ -644,7 +644,7 @@ def test_bitwise_or_scalar_tosa_INT(test_data: input_t2):
644644
645645
646646@common .parametrize ("test_data" , Or ().test_data_non_bool )
647- def test_bitwise_or_tensor_u55_INT (test_data : input_t2 ):
647+ def test_bitwise_or_tensor_u55_INT_not_delegated (test_data : input_t2 ):
648648 # Tests that we don't delegate these ops since they are not supported on U55.
649649 pipeline = OpNotSupportedPipeline [input_t2 ](
650650 Or (),
@@ -657,16 +657,16 @@ def test_bitwise_or_tensor_u55_INT(test_data: input_t2):
657657
658658
659659@common .parametrize ("test_data" , OrScalar .test_data )
660- def test_bitwise_or_scalar_u55_INT (test_data : input_t2 ):
661- # There will be one full op which will be delegated.
662- num_delegates = 1
663- num_exir = 0
660+ def test_bitwise_or_scalar_u55_INT_not_delegated (test_data : input_t2 ):
661+ # There will be one full op which will be delegated, unless it outputs boolean .
662+ test_input = test_data ()
663+ num_delegates = 0 if test_input [ 0 ]. dtype == torch . bool else 1
664664 pipeline = OpNotSupportedPipeline [input_t2 ](
665665 OrScalar (),
666- test_data () ,
666+ test_input ,
667667 {
668668 OrScalar .exir_op : 1 ,
669- "executorch_exir_dialects_edge__ops_aten_full_default" : num_exir ,
669+ "executorch_exir_dialects_edge__ops_aten_full_default" : 1 - num_delegates ,
670670 },
671671 num_delegates ,
672672 quantize = True ,
0 commit comments