rmp: Genetic algorithm for slack tuning
New resynthesis strategy for rmp.
Alternative approach to https://github.com/The-OpenROAD-Project/OpenROAD/pull/8437 for optimizing ABC timing.
Utilizes a genetic algorithm with the following tunable parameters:
- population size
- mutation probability
- cross probability
- tournament size
- tournament probability
Results from regression tests:
| test | slack | execution time [s] |
|---|---|---|
| asap7 aes_genetic | +26.52 | 164.3 |
| asap7 aes_annealing | +14.28 | 52.7 |
Marking as draft for a discussion, currently working on some minor implementation restructuring and algorithm parameter tuning.
Depends on https://github.com/The-OpenROAD-Project/OpenROAD/pull/8889.
aes on what pdk? Are the slacks negative or positive?
Tested on asap7 PDK.
Results (in the regression test suite):
aes_annealing.ok
aes_genetic.ok
Slacks are positive, the higher the better. I'll adjust the description.
@QuantamHD please assign a Google reviewer
@calewis could you review this PR from antmicro?
@calewis could you review this PR from antmicro?
Almost done, I just need to go through src/rmp/src/gia.cpp tomorrow.
I'll review after your comments are addressed
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
The only errors I'm getting right now are related to ABC imports. For instance, importing header such as map/if/if.h causes include cycle warning (which is there as it includes map/if/acd/ac_wrapper.h which includes if.h) and redeclaration errors in cmake build.
Not including this header causes misc-include-cleaner warning as those functions are not directly included in ac_wrapper.h. I'm also getting warnings from the inside of ABC library too.
@maliberty Should I avoid including this header altogether or ignore all problematical warnings with lint comments and compiler pragmas?
I'm also running a benchmark for https://github.com/The-OpenROAD-Project/OpenROAD/pull/8908#discussion_r2579031594 to decide which mutation approach will be best.
Besides that, I believe this PR is ready for a review.
If you don't include if.h in ac_wrapper.h, what are "those functions" that it complains about?
clang-tidy review says "All clean, LGTM! :+1:"
@maliberty The if.h header is required to be able to construct If_Par_t struct with custom parameters (defined there).
This header throws two warnings:
Wredundant-decls(for repeated externs)Wunused-but-set-variable(for inline code inutilTruth.h) I'd silenced those warnings for this header only, this resolved issues.
I'd also removed call to ABSL_UNREACHABLE as it requires bumping abseil to at least 2023. Then we may also add it to https://github.com/The-OpenROAD-Project/OpenROAD/blob/b57cfc641359379a86bd13e6a66bccdde1840a7e/src/dft/src/clock_domain/ClockDomain.cpp#L38 and nix environment files would need to be bumped as well in a separate PR.
clang-tidy review says "All clean, LGTM! :+1:"
clang-tidy review says "All clean, LGTM! :+1:"
@maliberty All tests pass now without warnings
clang-tidy review says "All clean, LGTM! :+1:"