Skip to content

ord: default thread count to number of available CPUs (#10350)#10724

Open
saurav-fermions wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Fermions-ASI:fix/10350
Open

ord: default thread count to number of available CPUs (#10350)#10724
saurav-fermions wants to merge 1 commit into
The-OpenROAD-Project:masterfrom
Fermions-ASI:fix/10350

Conversation

@saurav-fermions

Copy link
Copy Markdown
Contributor

Summary

Defaults thread_count to the number of available CPUs instead of 1, so users who do not pass -threads N no longer run single-threaded unknowingly. Explicit -threads N overrides still work and regression-test determinism is preserved.

Type of Change

  • Enhancement

Impact

Faster default runs on multi-core machines; explicit overrides unchanged.

Verification

  • Local build succeeds.
  • Relevant tests pass (rebuilt from source): Measured default thread_count 1 -> nCPU; -threads N override verified.
  • Code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Related Issues

Fixes #10350


Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).

…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>
@saurav-fermions saurav-fermions requested a review from a team as a code owner June 21, 2026 05:16

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Thread count should be equal to number of CPUs by default

1 participant