@@ -278,6 +278,51 @@ def test_add_tensor_vgf_quant(test_data: input_t1):
278278 pipeline .run ()
279279
280280
281+ class AddConvResidual (torch .nn .Module ):
282+ """Conv(x) + x — residual block.
283+
284+ Creates non-unit IFM scales
285+
286+ """
287+
288+ def __init__ (self ):
289+ super ().__init__ ()
290+ self .conv = torch .nn .Conv2d (3 , 3 , 1 , bias = False )
291+
292+ def forward (self , x ):
293+ return self .conv (x ) + x
294+
295+ test_data = {
296+ "4d_randn" : lambda : (torch .randn (1 , 3 , 4 , 4 ),),
297+ }
298+
299+
300+ @common .parametrize ("test_data" , AddConvResidual .test_data )
301+ def test_add_conv_residual_tosa_INT (test_data : input_t1 ):
302+ pipeline = TosaPipelineINT [input_t1 ](
303+ AddConvResidual (), test_data (), aten_op , exir_op
304+ )
305+ pipeline .run ()
306+
307+
308+ @common .parametrize ("test_data" , AddConvResidual .test_data )
309+ @common .XfailIfNoCorstone300
310+ def test_add_conv_residual_u55_INT (test_data : input_t1 ):
311+ pipeline = EthosU55PipelineINT [input_t1 ](
312+ AddConvResidual (), test_data (), aten_op , exir_op
313+ )
314+ pipeline .run ()
315+
316+
317+ @common .parametrize ("test_data" , AddConvResidual .test_data )
318+ @common .XfailIfNoCorstone320
319+ def test_add_conv_residual_u85_INT (test_data : input_t1 ):
320+ pipeline = EthosU85PipelineINT [input_t1 ](
321+ AddConvResidual (), test_data (), aten_op , exir_op
322+ )
323+ pipeline .run ()
324+
325+
281326@common .parametrize ("test_data" , Add .test_data )
282327def test_add_tensor_tosa_INT_16a8w (test_data : input_t1 ):
283328 """Test add operation with 16A8W quantization (16-bit activations, 8-bit
0 commit comments