Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions tools/AutoTuner/test/smoke_test_algo_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,15 @@
class BaseAlgoEvalSmokeTest(unittest.TestCase):
platform = ""
design = ""
flow_variant = "smoke-test-algo-eval"

def setUp(self):
design_path = f"../../../flow/designs/{self.platform}/{self.design}"
self.config = os.path.join(cur_dir, f"{design_path}/autotuner.json")
self.experiment = f"smoke-test-algo-eval-{self.platform}"
self.reference = os.path.join(cur_dir, f"{design_path}/metadata-base-at.json")
self.experiment = f"{self.flow_variant}-{self.platform}"
self.reference = os.path.join(
cur_dir, f"{design_path}/metadata-{self.flow_variant}-at.json"
)
# note for ppa-improv, you need to also add in reference file (--reference)
_algo = ["hyperopt", "ax", "optuna", "pbt", "random"]
_eval = ["default", "ppa-improv"]
Expand All @@ -68,12 +71,12 @@ def setUp(self):
]

def make_base(self):
commands = [
f"make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk clean_all",
f"make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk EQUIVALENCE_CHECK=0",
f"make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk update_metadata_autotuner",
base_commands = [
f"FLOW_VARIANT={self.flow_variant} make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk clean_all",
f"FLOW_VARIANT={self.flow_variant} make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk EQUIVALENCE_CHECK=0",
f"FLOW_VARIANT={self.flow_variant} make -C {orfs_dir} DESIGN_CONFIG=./designs/{self.platform}/{self.design}/config.mk update_metadata_autotuner",
]
for command in commands:
for command in base_commands:
out = subprocess.run(command, shell=True)
self.assertTrue(out.returncode in accepted_rc)

Expand Down