File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ if [ $RUN_AUTOTUNER -eq 1 ]; then
114114 echo " Running Autotuner smoke tests for --sample and --iteration."
115115 python3 -m unittest tools.AutoTuner.test.smoke_test_sample_iteration.${PLATFORM} SampleIterationSmokeTest.test_sample_iteration
116116
117+ echo " Running Autotuner smoke Vizier test"
118+ python3 -m unittest tools.AutoTuner.test.smoke_test_vizier.${PLATFORM} VizierSmokeTest.test_vizier
119+
117120 if [ " $PLATFORM " == " asap7" ] && [ " $DESIGN " == " gcd" ]; then
118121 echo " Running Autotuner ref file test (only once)"
119122 python3 -m unittest tools.AutoTuner.test.ref_file_check.RefFileCheck.test_files
Original file line number Diff line number Diff line change 1+ import unittest
2+ import subprocess
3+ import os
4+ from datetime import datetime
5+
6+ cur_dir = os .path .dirname (os .path .abspath (__file__ ))
7+
8+
9+ class BaseVizierSmokeTest (unittest .TestCase ):
10+ platform = ""
11+ design = ""
12+
13+ def setUp (self ):
14+ self .config = os .path .join (
15+ cur_dir ,
16+ f"../../../flow/designs/{ self .platform } /{ self .design } /autotuner.json" ,
17+ )
18+ self .experiment = f"smoke-test-tune-{ self .platform } -{ datetime .now ().strftime ('%Y-%m-%d-%H-%M-%S' )} "
19+ self .command = (
20+ "python3 -m autotuner.vizier"
21+ f" --design { self .design } "
22+ f" --platform { self .platform } "
23+ f" --experiment { self .experiment } "
24+ f" --config { self .config } "
25+ f" --iteration 1 --suggestions 1"
26+ )
27+
28+ def test_vizier (self ):
29+ if not (self .platform and self .design ):
30+ raise unittest .SkipTest ("Platform and design have to be defined" )
31+ out = subprocess .run (self .command , shell = True , check = True )
32+ successful = out .returncode == 0
33+ self .assertTrue (successful )
34+
35+
36+ class ASAP7VizierSmokeTest (BaseVizierSmokeTest ):
37+ platform = "asap7"
38+ design = "gcd"
39+
40+
41+ class SKY130HDVizierSmokeTest (BaseVizierSmokeTest ):
42+ platform = "sky130hd"
43+ design = "gcd"
44+
45+
46+ class IHPSG13G2VizierSmokeTest (BaseVizierSmokeTest ):
47+ platform = "ihp-sg13g2"
48+ design = "gcd"
49+
50+
51+ if __name__ == "__main__" :
52+ unittest .main ()
You can’t perform that action at this time.
0 commit comments