@@ -125,6 +125,19 @@ def test_qnn_backend_abs(self):
125125 sample_input = (torch .randn (1 , 2 , 3 , 4 ),)
126126 self .lower_module_and_test_output (module , sample_input )
127127
128+ def test_qnn_backend_acos (self ):
129+ module = Acos () # noqa: F405
130+ sample_input = (torch .rand (3 , 4 ) * 2 - 1 ,)
131+ self .lower_module_and_test_output (module , sample_input )
132+
133+ def test_qnn_backend_acos_multi_node (self ):
134+ module = AcosMultiNode () # noqa: F405
135+ sample_input = (
136+ torch .tensor ([0.0 , 0.5 , - 0.5 , 1.0 , - 1.0 ]),
137+ torch .tensor ([0.1 , - 0.1 , 0.9 , - 0.9 , 0.0 ]),
138+ )
139+ self .lower_module_and_test_output (module , sample_input )
140+
128141 def test_qnn_backend_adaptive_avg_pool1d (self ):
129142 module = AdaptiveAvgPool1D () # noqa: F405
130143 sample_input = (torch .randn (1 , 512 , 7 ),)
@@ -1455,6 +1468,14 @@ def test_qnn_backend_log_softmax(self):
14551468 sample_input = (torch .randn ([1 , 4 , 8 , 8 ]),)
14561469 self .lower_module_and_test_output (module , sample_input )
14571470
1471+ def test_qnn_backend_log_variants_multi_node (self ):
1472+ module = LogVariantsMultiNode () # noqa: F405
1473+ sample_input = (
1474+ torch .abs (torch .rand (2 , 3 , 4 )) + 0.1 ,
1475+ torch .abs (torch .rand (2 , 3 , 4 )) + 0.1 ,
1476+ )
1477+ self .lower_module_and_test_output (module , sample_input )
1478+
14581479 def test_qnn_backend_log10 (self ):
14591480 module = Log10 () # noqa: F405
14601481 sample_input = (torch .abs (torch .rand (2 , 5 , 1 , 3 ) + 0.1 ),)
@@ -2362,6 +2383,21 @@ def test_qnn_backend_abs(self):
23622383 module = self .get_qdq_module (module , sample_input )
23632384 self .lower_module_and_test_output (module , sample_input )
23642385
2386+ def test_qnn_backend_acos (self ):
2387+ module = Acos () # noqa: F405
2388+ sample_input = (torch .rand (3 , 4 ) * 2 - 1 ,)
2389+ module = self .get_qdq_module (module , sample_input )
2390+ self .lower_module_and_test_output (module , sample_input )
2391+
2392+ def test_qnn_backend_acos_multi_node (self ):
2393+ module = AcosMultiNode () # noqa: F405
2394+ sample_input = (
2395+ torch .tensor ([0.0 , 0.5 , - 0.5 , 1.0 , - 1.0 ]),
2396+ torch .tensor ([0.1 , - 0.1 , 0.9 , - 0.9 , 0.0 ]),
2397+ )
2398+ module = self .get_qdq_module (module , sample_input )
2399+ self .lower_module_and_test_output (module , sample_input )
2400+
23652401 def test_qnn_backend_adaptive_avg_pool1d (self ):
23662402 module = AdaptiveAvgPool1D () # noqa: F405
23672403 sample_input = (torch .randn (1 , 512 , 7 ),)
@@ -3813,6 +3849,15 @@ def test_qnn_backend_log_softmax(self):
38133849 module = self .get_qdq_module (module , sample_input )
38143850 self .lower_module_and_test_output (module , sample_input )
38153851
3852+ def test_qnn_backend_log_variants_multi_node (self ):
3853+ module = LogVariantsMultiNode () # noqa: F405
3854+ sample_input = (
3855+ torch .abs (torch .rand (2 , 3 , 4 )) + 0.1 ,
3856+ torch .abs (torch .rand (2 , 3 , 4 )) + 0.1 ,
3857+ )
3858+ module = self .get_qdq_module (module , sample_input )
3859+ self .lower_module_and_test_output (module , sample_input )
3860+
38163861 def test_qnn_backend_log10 (self ):
38173862 module = Log10 () # noqa: F405
38183863 sample_input = (torch .abs (torch .rand (2 , 5 , 1 , 3 ) + 0.1 ),)
0 commit comments