@@ -4698,14 +4698,13 @@ def test_gMLP(self):
46984698 self .assertGreaterEqual (msg ["top_1" ], 60 )
46994699 self .assertGreaterEqual (msg ["top_5" ], 85 )
47004700
4701- @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4702- def test_mobilevit_v2 (self ):
4701+ def test_mobilevit_v1 (self ):
47034702 if not self .required_envs ([self .image_dataset ]):
47044703 self .skipTest ("missing required envs" )
47054704
47064705 cmds = [
47074706 "python" ,
4708- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2 .py" ,
4707+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v1 .py"
47094708 "--dataset" ,
47104709 self .image_dataset ,
47114710 "--artifact" ,
@@ -4723,8 +4722,6 @@ def test_mobilevit_v2(self):
47234722 ]
47244723 if self .host :
47254724 cmds .extend (["--host" , self .host ])
4726- if self .shared_buffer :
4727- cmds .extend (["--shared_buffer" ])
47284725
47294726 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
47304727 with Listener ((self .ip , self .port )) as listener :
@@ -4734,17 +4731,22 @@ def test_mobilevit_v2(self):
47344731 if "Error" in msg :
47354732 self .fail (msg ["Error" ])
47364733 else :
4737- self .assertGreaterEqual (msg ["top_1" ], 50 )
4734+ self .assertGreaterEqual (msg ["top_1" ], 70 )
47384735 self .assertGreaterEqual (msg ["top_5" ], 85 )
47394736
4740- def test_pvt (self ):
4737+ @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4738+ def test_mobilevit_v2 (self ):
47414739 if not self .required_envs ([self .image_dataset ]):
47424740 self .skipTest ("missing required envs" )
47434741
47444742 cmds = [
47454743 "python" ,
4746- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
4744+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit_v2.py" ,
4745+ "--dataset" ,
47474746 self .image_dataset ,
4747+ "--artifact" ,
4748+ self .artifact_dir ,
4749+ "--build_folder" ,
47484750 self .build_folder ,
47494751 "--device" ,
47504752 self .device ,
@@ -4757,6 +4759,8 @@ def test_pvt(self):
47574759 ]
47584760 if self .host :
47594761 cmds .extend (["--host" , self .host ])
4762+ if self .shared_buffer :
4763+ cmds .extend (["--shared_buffer" ])
47604764
47614765 p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
47624766 with Listener ((self .ip , self .port )) as listener :
@@ -4766,21 +4770,17 @@ def test_pvt(self):
47664770 if "Error" in msg :
47674771 self .fail (msg ["Error" ])
47684772 else :
4769- self .assertGreaterEqual (msg ["top_1" ], 65 )
4773+ self .assertGreaterEqual (msg ["top_1" ], 50 )
47704774 self .assertGreaterEqual (msg ["top_5" ], 85 )
47714775
4772- def test_mobilevit1 (self ):
4776+ def test_pvt (self ):
47734777 if not self .required_envs ([self .image_dataset ]):
47744778 self .skipTest ("missing required envs" )
47754779
47764780 cmds = [
47774781 "python" ,
4778- f"{ self .executorch_root } /examples/qualcomm/oss_scripts/mobilevit1.py"
4779- "--dataset" ,
4782+ f"{ self .executorch_root } /examples/qualcomm/oss_scripts/pvt.py" ,
47804783 self .image_dataset ,
4781- "--artifact" ,
4782- self .artifact_dir ,
4783- "--build_folder" ,
47844784 self .build_folder ,
47854785 "--device" ,
47864786 self .device ,
@@ -4802,7 +4802,7 @@ def test_mobilevit1(self):
48024802 if "Error" in msg :
48034803 self .fail (msg ["Error" ])
48044804 else :
4805- self .assertGreaterEqual (msg ["top_1" ], 70 )
4805+ self .assertGreaterEqual (msg ["top_1" ], 65 )
48064806 self .assertGreaterEqual (msg ["top_5" ], 85 )
48074807
48084808 def test_regnet (self ):
0 commit comments