@@ -233,6 +233,11 @@ def test_qnn_backend_cos(self):
233
233
sample_input = (torch .randn (2 , 5 , 1 , 3 ),)
234
234
self .lower_module_and_test_output (module , sample_input )
235
235
236
+ def test_qnn_backend_cumsum (self ):
237
+ module = CumSum () # noqa: F405
238
+ sample_input = (torch .randn (4 ),)
239
+ self .lower_module_and_test_output (module , sample_input )
240
+
236
241
def test_qnn_backend_einsum_outer_product (self ):
237
242
module = EinsumOuterProduct () # noqa: F405
238
243
x = torch .randn (5 )
@@ -1297,6 +1302,12 @@ def test_qnn_backend_cos(self):
1297
1302
module = self .get_qdq_module (module , sample_input )
1298
1303
self .lower_module_and_test_output (module , sample_input )
1299
1304
1305
+ def test_qnn_backend_cumsum (self ):
1306
+ module = CumSum () # noqa: F405
1307
+ sample_input = (torch .randn (4 ),)
1308
+ module = self .get_qdq_module (module , sample_input )
1309
+ self .lower_module_and_test_output (module , sample_input )
1310
+
1300
1311
def test_qnn_backend_einsum_outer_product (self ):
1301
1312
module = EinsumOuterProduct () # noqa: F405
1302
1313
x = torch .randn (5 )
@@ -3537,7 +3548,6 @@ def test_conv_former(self):
3537
3548
self .assertGreaterEqual (msg ["top_1" ], 60 )
3538
3549
self .assertGreaterEqual (msg ["top_5" ], 80 )
3539
3550
3540
- @unittest .skip ("bicubic resize is not supported" )
3541
3551
def test_dino_v2 (self ):
3542
3552
if not self .required_envs ([self .image_dataset ]):
3543
3553
self .skipTest ("missing required envs" )
@@ -3573,6 +3583,46 @@ def test_dino_v2(self):
3573
3583
self .assertGreaterEqual (msg ["top_1" ], 70 )
3574
3584
self .assertGreaterEqual (msg ["top_5" ], 85 )
3575
3585
3586
+ def test_efficientSAM (self ):
3587
+ if not self .required_envs (
3588
+ [self .image_dataset , self .pretrained_weight , self .oss_repo ]
3589
+ ):
3590
+ self .skipTest ("missing required envs" )
3591
+ cmds = [
3592
+ "python" ,
3593
+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/efficientSAM.py" ,
3594
+ "--dataset" ,
3595
+ self .image_dataset ,
3596
+ "--artifact" ,
3597
+ self .artifact_dir ,
3598
+ "--build_folder" ,
3599
+ self .build_folder ,
3600
+ "--device" ,
3601
+ self .device ,
3602
+ "--model" ,
3603
+ self .model ,
3604
+ "--oss_repo" ,
3605
+ self .oss_repo ,
3606
+ "--pretrained_weight" ,
3607
+ self .pretrained_weight ,
3608
+ "--ip" ,
3609
+ self .ip ,
3610
+ "--port" ,
3611
+ str (self .port ),
3612
+ ]
3613
+ if self .host :
3614
+ cmds .extend (["--host" , self .host ])
3615
+
3616
+ p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
3617
+ with Listener ((self .ip , self .port )) as listener :
3618
+ conn = listener .accept ()
3619
+ p .communicate ()
3620
+ msg = json .loads (conn .recv ())
3621
+ if "Error" in msg :
3622
+ self .fail (msg ["Error" ])
3623
+ else :
3624
+ self .assertGreaterEqual (msg ["MIoU" ], 0.55 )
3625
+
3576
3626
def test_esrgan (self ):
3577
3627
if not self .required_envs ():
3578
3628
self .skipTest ("missing required envs" )
0 commit comments