ord: default thread count to number of available CPUs (#10350)#10724
Open
saurav-fermions wants to merge 1 commit into
Open
ord: default thread count to number of available CPUs (#10350)#10724saurav-fermions wants to merge 1 commit into
saurav-fermions wants to merge 1 commit into
Conversation
…roject#10350) OpenROAD previously booted with thread_count=1, so users who did not pass "-threads N" ran single-threaded without knowing it. Resolve the default thread count in the OpenRoad constructor via std::thread::hardware_concurrency(), i.e. behave like "-threads max" by default. An explicit "-threads N" / "-threads max" CLI flag and the set_thread_count Tcl command still override the default. A fallback of 1 thread is kept for the case hardware_concurrency() returns 0 (unable to determine CPU count). Determinism: regression tests are unaffected. Flow tests already call set_thread_count [cpu_count] and pin sta::set_thread_count 1; tool unit tests that care set their own thread count; the regression harness does not pass -threads by default. Verified utl/dpl/grt/rsz/gpl subsets pass with the new default. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the OpenRoad constructor in src/OpenRoad.cc to default the thread count to the number of available hardware CPUs (falling back to 1 if hardware concurrency cannot be determined). This ensures that the application does not silently run single-threaded when no explicit thread count is provided. There are no review comments, so no feedback is provided.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Defaults
thread_countto the number of available CPUs instead of 1, so users who do not pass-threads Nno longer run single-threaded unknowingly. Explicit-threads Noverrides still work and regression-test determinism is preserved.Type of Change
Impact
Faster default runs on multi-core machines; explicit overrides unchanged.
Verification
thread_count1 -> nCPU;-threads Noverride verified.Related Issues
Fixes #10350
Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).