Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added default metric reporting. Reports QoR and power metrics for predefined synthesis steps. #832

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 9 additions & 0 deletions hammer/synthesis/genus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,12 @@ def init_environment(self) -> bool:
# TODO: is there a way to track instance paths through the synthesis process?
verbose_append("set_db root: .auto_ungroup none")

# Enable metric tracking
verbose_append(f"set_db statistics_log_data {self.get_setting('synthesis.genus.track_qor_metrics')}")
verbose_append(f"set_db statistics_log_data {self.get_setting('synthesis.genus.track_qor_metrics')}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated line?


verbose_append(f"set_db statistics_enable_power_report {self.get_setting('synthesis.genus.track_power_metrics')}")

# Set "don't use" cells.
for l in self.generate_dont_use_commands():
self.append(l)
Expand Down Expand Up @@ -345,6 +351,9 @@ def generate_reports(self) -> bool:
"""Generate reports."""
# TODO: extend report generation capabilities
self.verbose_append("write_reports -directory reports -tag final")

self.verbose_append("report_metric -format text -out_file reports/final_metrics.rpt")

return True

def write_regs(self) -> bool:
Expand Down
6 changes: 6 additions & 0 deletions hammer/synthesis/genus/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ synthesis.genus:

# Generate the TCL file but do not run it yet.
generate_only: false

# Track QoR metrics for predefined stages during synthesis: elaborate, syn_generic, syn_map and syn_opt.
track_qor_metrics: true

# Track power metrics for same stages as above. Runtime intensive.
track_power_metrics: true