2525from executorch .backends .nxp .tests .use_qat import * # noqa F403
2626
2727
28- def _normalized_dim (dim , rank ):
29- return dim if dim >= 0 else dim + rank
30-
31-
3228@pytest .fixture (autouse = True )
3329def reseed_model_per_test_run ():
3430 torch .manual_seed (23 )
@@ -64,7 +60,7 @@ def test__qat(self, mocker, use_qat):
6460 input_shape = (2 , 3 , 5 )
6561 num_inputs = 2
6662
67- input_shapes = [ModelInputSpec (input_shape )] * num_inputs
63+ input_shapes = [ModelInputSpec (input_shape ) for _ in range ( num_inputs )]
6864 model = CatModule (1 )
6965 graph_verifier = DetailedGraphVerifier (
7066 mocker , expected_delegated_ops = {Cat : 1 }, expected_non_delegated_ops = {}
@@ -76,7 +72,7 @@ def test__qat(self, mocker, use_qat):
7672 @pytest .mark .parametrize ("num_inputs" , [2 , 5 ], ids = lambda n : f"n={ n } " )
7773 def test__same_shapes (self , mocker , dim , num_inputs ):
7874 input_shape = (2 , 3 , 5 )
79- input_shapes = [ModelInputSpec (input_shape )] * num_inputs
75+ input_shapes = [ModelInputSpec (input_shape ) for _ in range ( num_inputs )]
8076
8177 model = CatModule (dim )
8278 graph_verifier = DetailedGraphVerifier (
@@ -89,7 +85,7 @@ def test__same_shapes(self, mocker, dim, num_inputs):
8985 @pytest .mark .parametrize ("num_inputs" , [2 , 5 ], ids = lambda n : f"n={ n } " )
9086 def test__same_shapes__channels_first (self , mocker , dim , num_inputs ):
9187 input_shape = (2 , 3 , 4 , 5 )
92- input_shapes = [ModelInputSpec (input_shape )] * num_inputs
88+ input_shapes = [ModelInputSpec (input_shape ) for _ in range ( num_inputs )]
9389
9490 model = CatMaxPoolModule (dim )
9591 graph_verifier = DetailedGraphVerifier (
0 commit comments