@@ -1713,6 +1713,26 @@ def test_qnn_backend_pow_tensor_scalar(self):
17131713 index += 1
17141714 self .lower_module_and_test_output (module , sample_input )
17151715
1716+ def test_qnn_backend_pow_scalar (self ):
1717+ test_comb = [
1718+ {
1719+ QCOM_MODULE : [
1720+ PowScalar (), # base=2.0, default # noqa: F405
1721+ PowScalar (3.0 ), # base=3.0, common case # noqa: F405
1722+ PowScalar (9 ), # base=9, integer exp case # noqa: F405
1723+ PowScalar (0.5 ), # base=0.5, fractional case # noqa: F405
1724+ ],
1725+ QCOM_SAMPLE_INPUTS : [(torch .rand (10 , 10 ) + 0.1 ,)],
1726+ },
1727+ ]
1728+ index = 0
1729+ for comb in test_comb :
1730+ for module in comb [QCOM_MODULE ]:
1731+ for sample_input in comb [QCOM_SAMPLE_INPUTS ]:
1732+ with self .subTest (i = index ):
1733+ index += 1
1734+ self .lower_module_and_test_output (module , sample_input )
1735+
17161736 def test_qnn_backend_prelu (self ):
17171737 test_comb = [
17181738 {
@@ -4229,6 +4249,27 @@ def test_qnn_backend_pow_tensor_scalar(self):
42294249 qdq_module = self .get_qdq_module (module , sample_input )
42304250 self .lower_module_and_test_output (qdq_module , sample_input )
42314251
4252+ def test_qnn_backend_pow_scalar (self ):
4253+ test_comb = [
4254+ {
4255+ QCOM_MODULE : [
4256+ PowScalar (), # base=2.0, default # noqa: F405
4257+ PowScalar (3.0 ), # base=3.0, common case # noqa: F405
4258+ PowScalar (9 ), # base=9, integer exp case # noqa: F405
4259+ PowScalar (0.5 ), # base=0.5, fractional case # noqa: F405
4260+ ],
4261+ QCOM_SAMPLE_INPUTS : [(torch .rand (10 , 10 ) + 0.1 ,)],
4262+ },
4263+ ]
4264+ index = 0
4265+ for comb in test_comb :
4266+ for module in comb [QCOM_MODULE ]:
4267+ for sample_input in comb [QCOM_SAMPLE_INPUTS ]:
4268+ with self .subTest (i = index ):
4269+ index += 1
4270+ qdq_module = self .get_qdq_module (module , sample_input )
4271+ self .lower_module_and_test_output (qdq_module , sample_input )
4272+
42324273 def test_qnn_backend_prelu (self ):
42334274 test_comb = [
42344275 {
0 commit comments