Skip to content

[AP][Solver] Enabled Parallel Eigen #3037

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexandreSinger
Copy link
Contributor

@AlexandreSinger AlexandreSinger commented May 14, 2025

The Eigen solver has the ability to use OpenMP to run the solver computations in parallel. Made the AP flow use the num_workers option to set the number of threads that Eigen can use.

VPR did not have the ability to build with OpenMP in its CMAKE. Added an option to the CMAKE to allow the user to enable OpenMP.

Resolves #3030

Currently running the VTR circuits using 4 threads, will show the results. As a preview, MCML's Global Placement went from 141 seconds to 92 seconds on 4 threads.

I made OpenMP disabled by default for now since only the AP flow uses OpenMP. Perhaps we can enable this by default only when AP is enabled or just always enable it.

The Eigen solver has the ability to use OpenMP to run the solver
computations in parallel. Made the AP flow use the num_workers option to
set the number of threads that Eigen can use.

VPR did not have the ability to build with OpenMP in its CMAKE. Added an
option to the CMAKE to allow the user to enable OpenMP.
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code lang-make CMake/Make code labels May 14, 2025
@AlexandreSinger
Copy link
Contributor Author

@AmirhosseinPoolad You may find this update interesting since I added a CMAKE option which enables OpenMP.

@AlexandreSinger
Copy link
Contributor Author

Results on largest VTR circuits:

  OpenMP Disabled OpenMP Enabled 1T OpenMP Enabled 4T
GP run time 1 0.9956934236 0.6646688318
Total run time 1 0.9909095635 0.8437623927

Turning on parallelism for 4 threads reduced the overall run time by 15%. I think this number can be even larger with bigger circuits such as the Titan circuits.

@AlexandreSinger
Copy link
Contributor Author

@vaughnbetz This is ready for review. It looks like this does not have perfect scaling, but it may scale better to larger circuits. Perhaps this can be explored more in a future paper.

What do you think about having OpenMP disabled by default? I could have it enabled by default and then disable it if it cannot be found on the system; or only turn it on if Eigen is installed. I do not think having OpenMP enabled and not used will have any affect; but I wanted to see what you thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code lang-make CMake/Make code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AP] Eigen automatically and without asking the user uses multiple threads when VPR is compiled with -fopenmp
1 participant