@@ -4585,14 +4585,13 @@ def test_gMLP(self):
45854585 self .assertGreaterEqual (msg ["top_1" ], 60 )
45864586 self .assertGreaterEqual (msg ["top_5" ], 85 )
45874587
4588- @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4589- def test_mobilevit_v2 (self ):
4588+ def test_mobilevit_v1 (self ):
45904589 if not self .required_envs ([self .image_dataset ]):
45914590 self .skipTest ("missing required envs" )
45924591
45934592 cmds = [
45944593 "python" ,
4595- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2 .py" ,
4594+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v1 .py"
45964595 "--dataset" ,
45974596 self .image_dataset ,
45984597 "--artifact" ,
@@ -4610,8 +4609,6 @@ def test_mobilevit_v2(self):
46104609 ]
46114610 if self .host :
46124611 cmds .extend (["--host" , self .host ])
4613- if self .shared_buffer :
4614- cmds .extend (["--shared_buffer" ])
46154612
46164613 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
46174614 with Listener ((self .ip , self .port )) as listener :
@@ -4621,17 +4618,22 @@ def test_mobilevit_v2(self):
46214618 if "Error" in msg :
46224619 self .fail (msg ["Error" ])
46234620 else :
4624- self .assertGreaterEqual (msg ["top_1" ], 50 )
4621+ self .assertGreaterEqual (msg ["top_1" ], 70 )
46254622 self .assertGreaterEqual (msg ["top_5" ], 85 )
46264623
4627- def test_pvt (self ):
4624+ @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4625+ def test_mobilevit_v2 (self ):
46284626 if not self .required_envs ([self .image_dataset ]):
46294627 self .skipTest ("missing required envs" )
46304628
46314629 cmds = [
46324630 "python" ,
4633- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
4631+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2.py" ,
4632+ "--dataset" ,
46344633 self .image_dataset ,
4634+ "--artifact" ,
4635+ self .artifact_dir ,
4636+ "--build_folder" ,
46354637 self .build_folder ,
46364638 "--device" ,
46374639 self .device ,
@@ -4644,6 +4646,8 @@ def test_pvt(self):
46444646 ]
46454647 if self .host :
46464648 cmds .extend (["--host" , self .host ])
4649+ if self .shared_buffer :
4650+ cmds .extend (["--shared_buffer" ])
46474651
46484652 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
46494653 with Listener ((self .ip , self .port )) as listener :
@@ -4653,21 +4657,17 @@ def test_pvt(self):
46534657 if "Error" in msg :
46544658 self .fail (msg ["Error" ])
46554659 else :
4656- self .assertGreaterEqual (msg ["top_1" ], 65 )
4660+ self .assertGreaterEqual (msg ["top_1" ], 50 )
46574661 self .assertGreaterEqual (msg ["top_5" ], 85 )
46584662
4659- def test_mobilevit1 (self ):
4663+ def test_pvt (self ):
46604664 if not self .required_envs ([self .image_dataset ]):
46614665 self .skipTest ("missing required envs" )
46624666
46634667 cmds = [
46644668 "python" ,
4665- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit1.py"
4666- "--dataset" ,
4669+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
46674670 self .image_dataset ,
4668- "--artifact" ,
4669- self .artifact_dir ,
4670- "--build_folder" ,
46714671 self .build_folder ,
46724672 "--device" ,
46734673 self .device ,
@@ -4689,7 +4689,7 @@ def test_mobilevit1(self):
46894689 if "Error" in msg :
46904690 self .fail (msg ["Error" ])
46914691 else :
4692- self .assertGreaterEqual (msg ["top_1" ], 70 )
4692+ self .assertGreaterEqual (msg ["top_1" ], 65 )
46934693 self .assertGreaterEqual (msg ["top_5" ], 85 )
46944694
46954695 def test_regnet (self ):
0 commit comments