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