Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions tools/AutoTuner/src/autotuner/distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ def step(self):

# if not a valid config, then don't run and pass back an error
if not self.is_valid_config:
return {METRIC: ERROR_METRIC, "effective_clk_period": "-", "num_drc": "-"}
return {
METRIC: ERROR_METRIC,
"effective_clk_period": ERROR_METRIC,
"num_drc": ERROR_METRIC,
"die_area": ERROR_METRIC,
}
self._variant = f"{self.variant}-{self.step_}"
metrics_file = openroad(
args=args,
Expand Down Expand Up @@ -242,7 +247,7 @@ def evaluate(self, metrics):
error = "ERR" in metrics.values() or "ERR" in reference.values()
not_found = "N/A" in metrics.values() or "N/A" in reference.values()
if error or not_found:
return (ERROR_METRIC, "-", "-", "-")
return (ERROR_METRIC, ERROR_METRIC, ERROR_METRIC, ERROR_METRIC)
ppa = self.get_ppa(metrics)
gamma = ppa / 10
score = ppa * (self.step_ / 100) ** (-1) + (gamma * metrics["num_drc"])
Expand Down
2 changes: 1 addition & 1 deletion tools/AutoTuner/src/autotuner/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def calculate_score(metrics, step=1):
not_found = "N/A" in metrics.values()

if error or not_found:
return (ERROR_METRIC, "-", "-", "-")
return (ERROR_METRIC, ERROR_METRIC, ERROR_METRIC, ERROR_METRIC)

effective_clk_period = metrics["clk_period"] - metrics["worst_slack"]
num_drc = metrics["num_drc"]
Expand Down