@@ -507,6 +507,16 @@ def test_qnn_backend_interpolate_nearest_2d(self):
507
507
sample_input = (torch .randn (2 , 3 , 4 , 5 ),)
508
508
self .lower_module_and_test_output (module , sample_input )
509
509
510
+ def test_qnn_backend_up_sampling_nearest_2d_with_scale_factor (self ):
511
+ module = UpsampleNearest2D (scale_factor = 2 ) # noqa: F405
512
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
513
+ self .lower_module_and_test_output (module , sample_input )
514
+
515
+ def test_qnn_backend_up_sampling_nearest_2d_with_size (self ):
516
+ module = UpsampleNearest2D (sizes = (144 , 208 )) # noqa: F405
517
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
518
+ self .lower_module_and_test_output (module , sample_input )
519
+
510
520
def test_qnn_backend_layer_norm (self ):
511
521
modules = [LayerNorm (), LayerNorm (bias = False )] # noqa: F405
512
522
sample_input = (torch .randn (196 , 768 ),)
@@ -1498,6 +1508,18 @@ def test_qnn_backend_interpolate_nearest_2d(self):
1498
1508
module = self .get_qdq_module (module , sample_input )
1499
1509
self .lower_module_and_test_output (module , sample_input )
1500
1510
1511
+ def test_qnn_backend_up_sampling_nearest_2d_with_scale_factor (self ):
1512
+ module = UpsampleNearest2D (scale_factor = 2 ) # noqa: F405
1513
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
1514
+ module = self .get_qdq_module (module , sample_input )
1515
+ self .lower_module_and_test_output (module , sample_input )
1516
+
1517
+ def test_qnn_backend_up_sampling_nearest_2d_with_size (self ):
1518
+ module = UpsampleNearest2D (sizes = (144 , 208 )) # noqa: F405
1519
+ sample_input = (torch .randn (1 , 16 , 72 , 104 ),)
1520
+ module = self .get_qdq_module (module , sample_input )
1521
+ self .lower_module_and_test_output (module , sample_input )
1522
+
1501
1523
def test_qnn_backend_layer_norm (self ):
1502
1524
modules = [LayerNorm (), LayerNorm (bias = False )] # noqa: F405
1503
1525
sample_input = (torch .randn (196 , 768 ),)
0 commit comments