@@ -394,6 +394,50 @@ def test_sub_dual_conv_u85_INT(test_data: input_t1):
394394 pipeline .run ()
395395
396396
397+ class SubMultiReader (torch .nn .Module ):
398+ """conv2(conv1(x)) - conv3(conv1(x)) — conv1's output Rescale has two readers."""
399+
400+ def __init__ (self ):
401+ super ().__init__ ()
402+ self .conv1 = torch .nn .Conv2d (3 , 3 , 1 , bias = False )
403+ self .conv2 = torch .nn .Conv2d (3 , 3 , 1 , bias = False )
404+ self .conv3 = torch .nn .Conv2d (3 , 3 , 1 , bias = False )
405+
406+ def forward (self , x ):
407+ y = self .conv1 (x )
408+ return self .conv2 (y ) - self .conv3 (y )
409+
410+ test_data = {
411+ "4d_randn" : lambda : (torch .randn (1 , 3 , 4 , 4 ),),
412+ }
413+
414+
415+ @common .parametrize ("test_data" , SubMultiReader .test_data )
416+ def test_sub_multi_reader_tosa_INT (test_data : input_t1 ):
417+ pipeline = TosaPipelineINT [input_t1 ](
418+ SubMultiReader (), test_data (), aten_op , exir_op
419+ )
420+ pipeline .run ()
421+
422+
423+ @common .parametrize ("test_data" , SubMultiReader .test_data )
424+ @common .XfailIfNoCorstone300
425+ def test_sub_multi_reader_u55_INT (test_data : input_t1 ):
426+ pipeline = EthosU55PipelineINT [input_t1 ](
427+ SubMultiReader (), test_data (), aten_op , exir_op
428+ )
429+ pipeline .run ()
430+
431+
432+ @common .parametrize ("test_data" , SubMultiReader .test_data )
433+ @common .XfailIfNoCorstone320
434+ def test_sub_multi_reader_u85_INT (test_data : input_t1 ):
435+ pipeline = EthosU85PipelineINT [input_t1 ](
436+ SubMultiReader (), test_data (), aten_op , exir_op
437+ )
438+ pipeline .run ()
439+
440+
397441@common .parametrize ("test_data" , sub_test_data )
398442def test_sub_tensor_16a8w_tosa_INT (test_data : input_t1 ):
399443 """Test sub operation with 16A8W quantization (16-bit activations, 8-bit
0 commit comments