The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.41k stars 494 forks source link

Enforce iteration order determinism for ppl::PinSet. #5234

Closed mikesinouye closed 3 days ago

mikesinouye commented 1 week ago

We are observing non-determinism in the output of the place_pins step across multiple runs of OpenROAD with fixed initial conditions. The root cause seems to be iteration over a set of odb::dbBTerm*.

With this change, we observe deterministic pin placement. Using dbBTerm.getId() for the comparison was considered but we suggest using getObjNames() to avoid being affected by upstream allocation order.

github-actions[bot] commented 1 week ago

clang-tidy review says "All clean, LGTM! :+1:"

eder-matheus commented 1 week ago

@mikesinouye Thanks for the contribution! Could you update the PPL unit tests as well? They're failing in our CI, which prevents the PR from merging.

maliberty commented 3 days ago

getObjName is wrong, I suppose you meant getName. However getId is relied on elsewhere so I see no reason to be different here.

github-actions[bot] commented 3 days ago

clang-tidy review says "All clean, LGTM! :+1:"