@@ -4885,14 +4885,13 @@ def test_gMLP(self):
48854885 self .assertGreaterEqual (msg ["top_1" ], 60 )
48864886 self .assertGreaterEqual (msg ["top_5" ], 85 )
48874887
4888- @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4889- def test_mobilevit_v2 (self ):
4888+ def test_mobilevit_v1 (self ):
48904889 if not self .required_envs ([self .image_dataset ]):
48914890 self .skipTest ("missing required envs" )
48924891
48934892 cmds = [
48944893 "python" ,
4895- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2 .py" ,
4894+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v1 .py"
48964895 "--dataset" ,
48974896 self .image_dataset ,
48984897 "--artifact" ,
@@ -4910,8 +4909,6 @@ def test_mobilevit_v2(self):
49104909 ]
49114910 if self .host :
49124911 cmds .extend (["--host" , self .host ])
4913- if self .shared_buffer :
4914- cmds .extend (["--shared_buffer" ])
49154912
49164913 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
49174914 with Listener ((self .ip , self .port )) as listener :
@@ -4921,17 +4918,22 @@ def test_mobilevit_v2(self):
49214918 if "Error" in msg :
49224919 self .fail (msg ["Error" ])
49234920 else :
4924- self .assertGreaterEqual (msg ["top_1" ], 50 )
4921+ self .assertGreaterEqual (msg ["top_1" ], 70 )
49254922 self .assertGreaterEqual (msg ["top_5" ], 85 )
49264923
4927- def test_pvt (self ):
4924+ @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4925+ def test_mobilevit_v2 (self ):
49284926 if not self .required_envs ([self .image_dataset ]):
49294927 self .skipTest ("missing required envs" )
49304928
49314929 cmds = [
49324930 "python" ,
4933- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
4931+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2.py" ,
4932+ "--dataset" ,
49344933 self .image_dataset ,
4934+ "--artifact" ,
4935+ self .artifact_dir ,
4936+ "--build_folder" ,
49354937 self .build_folder ,
49364938 "--device" ,
49374939 self .device ,
@@ -4944,6 +4946,8 @@ def test_pvt(self):
49444946 ]
49454947 if self .host :
49464948 cmds .extend (["--host" , self .host ])
4949+ if self .shared_buffer :
4950+ cmds .extend (["--shared_buffer" ])
49474951
49484952 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
49494953 with Listener ((self .ip , self .port )) as listener :
@@ -4953,21 +4957,17 @@ def test_pvt(self):
49534957 if "Error" in msg :
49544958 self .fail (msg ["Error" ])
49554959 else :
4956- self .assertGreaterEqual (msg ["top_1" ], 65 )
4960+ self .assertGreaterEqual (msg ["top_1" ], 50 )
49574961 self .assertGreaterEqual (msg ["top_5" ], 85 )
49584962
4959- def test_mobilevit1 (self ):
4963+ def test_pvt (self ):
49604964 if not self .required_envs ([self .image_dataset ]):
49614965 self .skipTest ("missing required envs" )
49624966
49634967 cmds = [
49644968 "python" ,
4965- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit1.py"
4966- "--dataset" ,
4969+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
49674970 self .image_dataset ,
4968- "--artifact" ,
4969- self .artifact_dir ,
4970- "--build_folder" ,
49714971 self .build_folder ,
49724972 "--device" ,
49734973 self .device ,
@@ -4989,7 +4989,7 @@ def test_mobilevit1(self):
49894989 if "Error" in msg :
49904990 self .fail (msg ["Error" ])
49914991 else :
4992- self .assertGreaterEqual (msg ["top_1" ], 70 )
4992+ self .assertGreaterEqual (msg ["top_1" ], 65 )
49934993 self .assertGreaterEqual (msg ["top_5" ], 85 )
49944994
49954995 def test_regnet (self ):
0 commit comments