@@ -410,6 +410,30 @@ def forward(self, x):
410410 dtype = torch .bfloat16 ,
411411 ),
412412}
413+ test_data_FP_fp16 = {
414+ "fp16_3x3" : lambda : Conv2d (
415+ height = 12 ,
416+ width = 12 ,
417+ in_channels = 3 ,
418+ out_channels = 4 ,
419+ kernel_size = (3 , 3 ),
420+ stride = (1 , 1 ),
421+ padding = (1 , 1 ),
422+ bias = True ,
423+ dtype = torch .float16 ,
424+ ),
425+ "fp16_1x1" : lambda : Conv2d (
426+ height = 8 ,
427+ width = 8 ,
428+ in_channels = 2 ,
429+ out_channels = 2 ,
430+ kernel_size = (1 , 1 ),
431+ stride = (2 , 1 ),
432+ padding = (0 , 3 ),
433+ bias = False ,
434+ dtype = torch .float16 ,
435+ ),
436+ }
413437
414438# Generate a new test set paired with per_channel_quant=True/False.
415439test_data_INT = {
@@ -431,7 +455,7 @@ def _get_dtype_count(model: torch.nn.Module):
431455 }
432456
433457
434- @common .parametrize ("test_data" , test_data_FP | test_data_FP_bf16 )
458+ @common .parametrize ("test_data" , test_data_FP | test_data_FP_bf16 | test_data_FP_fp16 )
435459def test_convolution_2d_tosa_FP (test_data ):
436460 model = test_data ()
437461 pipeline = TosaPipelineFP [input_t ](
@@ -539,7 +563,7 @@ def test_convolution_2d_u85_INT_a8w4(test_data):
539563 pipeline .run ()
540564
541565
542- @common .parametrize ("test_data" , test_data_FP )
566+ @common .parametrize ("test_data" , test_data_FP | test_data_FP_fp16 )
543567@common .SkipIfNoModelConverter
544568def test_convolution_2d_vgf_no_quant (test_data ):
545569 model = test_data ()
@@ -614,7 +638,7 @@ def test_convolution_2d_u55_INT_not_delegated(module: Conv2d):
614638
615639
616640@common .parametrize ("test_data" , test_data_INT )
617- def test_conv2d_tosa_INT_a16w8 (test_data : input_t ):
641+ def test_convolution_2d_tosa_INT_a16w8 (test_data : input_t ):
618642 """Test conv2d with 16A8W quantization for TOSA INT."""
619643 model , per_channel_quantization = test_data ()
620644 pipeline = TosaPipelineINT [input_t ](
@@ -630,7 +654,7 @@ def test_conv2d_tosa_INT_a16w8(test_data: input_t):
630654
631655@common .parametrize ("test_data" , test_data_INT )
632656@common .XfailIfNoCorstone300
633- def test_conv2d_u55_INT_a16w8 (test_data : input_t ):
657+ def test_convolution_2d_u55_INT_a16w8 (test_data : input_t ):
634658 """Test conv2d with 16A8W quantization on U55 (16-bit activations, 8-bit weights)"""
635659 model , per_channel_quantization = test_data ()
636660 pipeline = EthosU55PipelineINT [input_t ](
@@ -647,7 +671,7 @@ def test_conv2d_u55_INT_a16w8(test_data: input_t):
647671
648672@common .parametrize ("test_data" , test_data_INT )
649673@common .XfailIfNoCorstone320
650- def test_conv2d_u85_INT_a16w8 (test_data : input_t ):
674+ def test_convolution_2d_u85_INT_a16w8 (test_data : input_t ):
651675 """Test conv2d with 16A8W quantization on U85 (16-bit activations, 8-bit weights)"""
652676 model , per_channel_quantization = test_data ()
653677 pipeline = EthosU85PipelineINT [input_t ](
0 commit comments