File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
Expand file tree Collapse file tree 2 files changed +53
-0
lines changed 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+ out = subprocess .run (self .command , shell = True , check = True )
30+ successful = out .returncode == 0
31+ self .assertTrue (successful )
32+
33+
34+ class ASAP7VizierSmokeTest (BaseVizierSmokeTest ):
35+ platform = "asap7"
36+ design = "gcd"
37+
38+
39+ class SKY130HDVizierSmokeTest (BaseVizierSmokeTest ):
40+ platform = "sky130hd"
41+ design = "gcd"
42+
43+
44+ class IHPSG13G2VizierSmokeTest (BaseVizierSmokeTest ):
45+ platform = "ihp-sg13g2"
46+ design = "gcd"
47+
48+
49+ if __name__ == "__main__" :
50+ unittest .main ()
You can’t perform that action at this time.
0 commit comments