@@ -40,6 +40,14 @@ def forward(self, tensor1: torch.Tensor, tensor2: torch.Tensor):
4040 return tensor1 .logical_or (tensor2 )
4141
4242
43+ class Not (torch .nn .Module ):
44+ aten_op = "torch.ops.aten.logical_not.default"
45+ exir_op = "executorch_exir_dialects_edge__ops_aten_logical_not_default"
46+
47+ def forward (self , tensor : torch .Tensor ):
48+ return torch .logical_not (tensor )
49+
50+
4351input_t2 = Tuple [torch .Tensor , torch .Tensor ] # Input x, y
4452
4553
@@ -64,6 +72,10 @@ def forward(self, tensor1: torch.Tensor, tensor2: torch.Tensor):
6472
6573
6674test_data = {
75+ "not_rank1" : (Not (), test_input ["rank1" ][:- 1 ]),
76+ "not_rand_rank2" : (Not (), test_input ["rand_rank2" ][:- 1 ]),
77+ "not_rand_rank3" : (Not (), test_input ["rand_rank3" ][:- 1 ]),
78+ "not_rand_rank4" : (Not (), test_input ["rand_rank4" ][:- 1 ]),
6779 "and_rank1" : (And (), test_input ["rank1" ]),
6880 "and_rand_rank2" : (And (), test_input ["rand_rank2" ]),
6981 "and_rand_rank3" : (And (), test_input ["rand_rank3" ]),
@@ -80,6 +92,10 @@ def forward(self, tensor1: torch.Tensor, tensor2: torch.Tensor):
8092
8193
8294fvp_xfails = {
95+ "not_rank1" : "MLETORCH-706 Support ScalarType::Bool in EthosUBackend." ,
96+ "not_rand_rank2" : "MLETORCH-706: Support ScalarType::Bool in EthosUBackend." ,
97+ "not_rand_rank3" : "MLETORCH-706: Support ScalarType::Bool in EthosUBackend." ,
98+ "not_rand_rank4" : "MLETORCH-706: Support ScalarType::Bool in EthosUBackend." ,
8399 "and_rank1" : "MLETORCH-706 Support ScalarType::Bool in EthosUBackend." ,
84100 "and_rand_rank2" : "MLETORCH-706: Support ScalarType::Bool in EthosUBackend." ,
85101 "and_rand_rank3" : "MLETORCH-706: Support ScalarType::Bool in EthosUBackend." ,
0 commit comments