@@ -109,14 +109,18 @@ def test_qnn_backend_clamp(self):
109109 self .lower_module_and_test_output (module , sample_input )
110110
111111 def test_qnn_backend_conv1d (self ):
112- module = Conv1dSequential () # noqa: F405
112+ modules = [ Conv1dSequential (), Conv1dSequential ( bias = False )] # noqa: F405
113113 sample_input = (torch .randn ([1 , 1 , 3 ]),)
114- self .lower_module_and_test_output (module , sample_input )
114+ for i , module in enumerate (modules ):
115+ with self .subTest (i = i ):
116+ self .lower_module_and_test_output (module , sample_input )
115117
116118 def test_qnn_backend_conv2d (self ):
117- module = Conv2dSequential () # noqa: F405
119+ modules = [ Conv2dSequential (), Conv2dSequential ( bias = False )] # noqa: F405
118120 sample_input = (torch .randn ([1 , 1 , 3 , 3 ]),)
119- self .lower_module_and_test_output (module , sample_input )
121+ for i , module in enumerate (modules ):
122+ with self .subTest (i = i ):
123+ self .lower_module_and_test_output (module , sample_input )
120124
121125 def test_qnn_backend_element_wise_add (self ):
122126 test_comb = [
@@ -597,12 +601,14 @@ def setUp(self):
597601 )
598602
599603 def test_qnn_backend_16a4w_conv2d (self ):
600- module = Conv2dSingle () # noqa: F405
604+ modules = [ Conv2dSingle (), Conv2dSingle ( bias = False )] # noqa: F405
601605 sample_input = (torch .randn ([1 , 1 , 3 , 3 ]),)
602- module = self .get_qdq_module (
603- module , sample_input , quant_dtype = QuantDtype .use_16a4w
604- )
605- self .lower_module_and_test_output (module , sample_input )
606+ for i , module in enumerate (modules ):
607+ with self .subTest (i = i ):
608+ module = self .get_qdq_module (
609+ module , sample_input , quant_dtype = QuantDtype .use_16a4w
610+ )
611+ self .lower_module_and_test_output (module , sample_input )
606612
607613 def test_qnn_backend_16a4w_linear (self ):
608614 module = Linear () # noqa: F405
@@ -683,16 +689,20 @@ def test_qnn_backend_clamp(self):
683689 self .lower_module_and_test_output (module , sample_input )
684690
685691 def test_qnn_backend_conv1d (self ):
686- module = Conv1dSequential () # noqa: F405
692+ modules = [ Conv1dSequential (), Conv1dSequential ( bias = False )] # noqa: F405
687693 sample_input = (torch .randn ([1 , 1 , 3 ]),)
688- module = self .get_qdq_module (module , sample_input )
689- self .lower_module_and_test_output (module , sample_input )
694+ for i , module in enumerate (modules ):
695+ with self .subTest (i = i ):
696+ module = self .get_qdq_module (module , sample_input )
697+ self .lower_module_and_test_output (module , sample_input )
690698
691699 def test_qnn_backend_conv2d (self ):
692- module = Conv2dSequential () # noqa: F405
700+ modules = [ Conv2dSequential (), Conv2dSequential ( bias = False )] # noqa: F405
693701 sample_input = (torch .randn ([1 , 1 , 3 , 3 ]),)
694- module = self .get_qdq_module (module , sample_input )
695- self .lower_module_and_test_output (module , sample_input )
702+ for i , module in enumerate (modules ):
703+ with self .subTest (i = i ):
704+ module = self .get_qdq_module (module , sample_input )
705+ self .lower_module_and_test_output (module , sample_input )
696706
697707 def test_qnn_backend_element_wise_add (self ):
698708 test_comb = [
0 commit comments