@@ -4585,14 +4585,13 @@ def test_gMLP(self):
4585
4585
self .assertGreaterEqual (msg ["top_1" ], 60 )
4586
4586
self .assertGreaterEqual (msg ["top_5" ], 85 )
4587
4587
4588
- @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4589
- def test_mobilevit_v2 (self ):
4588
+ def test_mobilevit_v1 (self ):
4590
4589
if not self .required_envs ([self .image_dataset ]):
4591
4590
self .skipTest ("missing required envs" )
4592
4591
4593
4592
cmds = [
4594
4593
"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"
4596
4595
"--dataset" ,
4597
4596
self .image_dataset ,
4598
4597
"--artifact" ,
@@ -4610,8 +4609,6 @@ def test_mobilevit_v2(self):
4610
4609
]
4611
4610
if self .host :
4612
4611
cmds .extend (["--host" , self .host ])
4613
- if self .shared_buffer :
4614
- cmds .extend (["--shared_buffer" ])
4615
4612
4616
4613
p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
4617
4614
with Listener ((self .ip , self .port )) as listener :
@@ -4621,17 +4618,22 @@ def test_mobilevit_v2(self):
4621
4618
if "Error" in msg :
4622
4619
self .fail (msg ["Error" ])
4623
4620
else :
4624
- self .assertGreaterEqual (msg ["top_1" ], 50 )
4621
+ self .assertGreaterEqual (msg ["top_1" ], 70 )
4625
4622
self .assertGreaterEqual (msg ["top_5" ], 85 )
4626
4623
4627
- def test_pvt (self ):
4624
+ @unittest .skip ("Only outputs good accuracy in QNN 2.29" )
4625
+ def test_mobilevit_v2 (self ):
4628
4626
if not self .required_envs ([self .image_dataset ]):
4629
4627
self .skipTest ("missing required envs" )
4630
4628
4631
4629
cmds = [
4632
4630
"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" ,
4634
4633
self .image_dataset ,
4634
+ "--artifact" ,
4635
+ self .artifact_dir ,
4636
+ "--build_folder" ,
4635
4637
self .build_folder ,
4636
4638
"--device" ,
4637
4639
self .device ,
@@ -4644,6 +4646,8 @@ def test_pvt(self):
4644
4646
]
4645
4647
if self .host :
4646
4648
cmds .extend (["--host" , self .host ])
4649
+ if self .shared_buffer :
4650
+ cmds .extend (["--shared_buffer" ])
4647
4651
4648
4652
p = subprocess .Popen (cmds , stdout = subprocess .DEVNULL )
4649
4653
with Listener ((self .ip , self .port )) as listener :
@@ -4653,21 +4657,17 @@ def test_pvt(self):
4653
4657
if "Error" in msg :
4654
4658
self .fail (msg ["Error" ])
4655
4659
else :
4656
- self .assertGreaterEqual (msg ["top_1" ], 65 )
4660
+ self .assertGreaterEqual (msg ["top_1" ], 50 )
4657
4661
self .assertGreaterEqual (msg ["top_5" ], 85 )
4658
4662
4659
- def test_mobilevit1 (self ):
4663
+ def test_pvt (self ):
4660
4664
if not self .required_envs ([self .image_dataset ]):
4661
4665
self .skipTest ("missing required envs" )
4662
4666
4663
4667
cmds = [
4664
4668
"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" ,
4667
4670
self .image_dataset ,
4668
- "--artifact" ,
4669
- self .artifact_dir ,
4670
- "--build_folder" ,
4671
4671
self .build_folder ,
4672
4672
"--device" ,
4673
4673
self .device ,
@@ -4689,7 +4689,7 @@ def test_mobilevit1(self):
4689
4689
if "Error" in msg :
4690
4690
self .fail (msg ["Error" ])
4691
4691
else :
4692
- self .assertGreaterEqual (msg ["top_1" ], 70 )
4692
+ self .assertGreaterEqual (msg ["top_1" ], 65 )
4693
4693
self .assertGreaterEqual (msg ["top_5" ], 85 )
4694
4694
4695
4695
def test_regnet (self ):
0 commit comments