@@ -502,6 +502,16 @@ def test_qnn_backend_interpolate_nearest_2d(self):
502
502
sample_input = (torch .randn (2 , 3 , 4 , 5 ),)
503
503
self .lower_module_and_test_output (module , sample_input )
504
504
505
+ def test_qnn_backend_up_sampling_nearest_2d_with_scale_factor (self ):
506
+ module = UpsampleNearest2D (scale_factor = 2 ) # noqa: F405
507
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
508
+ self .lower_module_and_test_output (module , sample_input )
509
+
510
+ def test_qnn_backend_up_sampling_nearest_2d_with_size (self ):
511
+ module = UpsampleNearest2D (sizes = (144 , 208 )) # noqa: F405
512
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
513
+ self .lower_module_and_test_output (module , sample_input )
514
+
505
515
def test_qnn_backend_layer_norm (self ):
506
516
modules = [LayerNorm (), LayerNorm (bias = False )] # noqa: F405
507
517
sample_input = (torch .randn (196 , 768 ),)
@@ -1485,6 +1495,18 @@ def test_qnn_backend_interpolate_nearest_2d(self):
1485
1495
module = self .get_qdq_module (module , sample_input )
1486
1496
self .lower_module_and_test_output (module , sample_input )
1487
1497
1498
+ def test_qnn_backend_up_sampling_nearest_2d_with_scale_factor (self ):
1499
+ module = UpsampleNearest2D (scale_factor = 2 ) # noqa: F405
1500
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
1501
+ module = self .get_qdq_module (module , sample_input )
1502
+ self .lower_module_and_test_output (module , sample_input )
1503
+
1504
+ def test_qnn_backend_up_sampling_nearest_2d_with_size (self ):
1505
+ module = UpsampleNearest2D (sizes = (144 , 208 )) # noqa: F405
1506
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
1507
+ module = self .get_qdq_module (module , sample_input )
1508
+ self .lower_module_and_test_output (module , sample_input )
1509
+
1488
1510
def test_qnn_backend_layer_norm (self ):
1489
1511
modules = [LayerNorm (), LayerNorm (bias = False )] # noqa: F405
1490
1512
sample_input = (torch .randn (196 , 768 ),)
0 commit comments