@@ -4575,14 +4575,13 @@ def test_gMLP(self):
45754575 self .assertGreaterEqual (msg ["top_1" ], 60 )
45764576 self .assertGreaterEqual (msg ["top_5" ], 85 )
45774577
4578- @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4579- def test_mobilevit_v2 (self ):
4578+ def test_mobilevit_v1 (self ):
45804579 if not self .required_envs ([self .image_dataset ]):
45814580 self .skipTest ("missing required envs" )
45824581
45834582 cmds = [
45844583 "python" ,
4585- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2 .py" ,
4584+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v1 .py"
45864585 "--dataset" ,
45874586 self .image_dataset ,
45884587 "--artifact" ,
@@ -4600,8 +4599,6 @@ def test_mobilevit_v2(self):
46004599 ]
46014600 if self .host :
46024601 cmds .extend (["--host" , self .host ])
4603- if self .shared_buffer :
4604- cmds .extend (["--shared_buffer" ])
46054602
46064603 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
46074604 with Listener ((self .ip , self .port )) as listener :
@@ -4611,17 +4608,22 @@ def test_mobilevit_v2(self):
46114608 if "Error" in msg :
46124609 self .fail (msg ["Error" ])
46134610 else :
4614- self .assertGreaterEqual (msg ["top_1" ], 50 )
4611+ self .assertGreaterEqual (msg ["top_1" ], 70 )
46154612 self .assertGreaterEqual (msg ["top_5" ], 85 )
46164613
4617- def test_pvt (self ):
4614+ @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4615+ def test_mobilevit_v2 (self ):
46184616 if not self .required_envs ([self .image_dataset ]):
46194617 self .skipTest ("missing required envs" )
46204618
46214619 cmds = [
46224620 "python" ,
4623- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
4621+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2.py" ,
4622+ "--dataset" ,
46244623 self .image_dataset ,
4624+ "--artifact" ,
4625+ self .artifact_dir ,
4626+ "--build_folder" ,
46254627 self .build_folder ,
46264628 "--device" ,
46274629 self .device ,
@@ -4634,6 +4636,8 @@ def test_pvt(self):
46344636 ]
46354637 if self .host :
46364638 cmds .extend (["--host" , self .host ])
4639+ if self .shared_buffer :
4640+ cmds .extend (["--shared_buffer" ])
46374641
46384642 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
46394643 with Listener ((self .ip , self .port )) as listener :
@@ -4643,21 +4647,17 @@ def test_pvt(self):
46434647 if "Error" in msg :
46444648 self .fail (msg ["Error" ])
46454649 else :
4646- self .assertGreaterEqual (msg ["top_1" ], 65 )
4650+ self .assertGreaterEqual (msg ["top_1" ], 50 )
46474651 self .assertGreaterEqual (msg ["top_5" ], 85 )
46484652
4649- def test_mobilevit1 (self ):
4653+ def test_pvt (self ):
46504654 if not self .required_envs ([self .image_dataset ]):
46514655 self .skipTest ("missing required envs" )
46524656
46534657 cmds = [
46544658 "python" ,
4655- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit1.py"
4656- "--dataset" ,
4659+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
46574660 self .image_dataset ,
4658- "--artifact" ,
4659- self .artifact_dir ,
4660- "--build_folder" ,
46614661 self .build_folder ,
46624662 "--device" ,
46634663 self .device ,
@@ -4679,7 +4679,7 @@ def test_mobilevit1(self):
46794679 if "Error" in msg :
46804680 self .fail (msg ["Error" ])
46814681 else :
4682- self .assertGreaterEqual (msg ["top_1" ], 70 )
4682+ self .assertGreaterEqual (msg ["top_1" ], 65 )
46834683 self .assertGreaterEqual (msg ["top_5" ], 85 )
46844684
46854685 def test_regnet (self ):
0 commit comments