Skip to content

[AP] Generalized Argument Parsing and Added Target Density #3148

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

AlexandreSinger
Copy link
Contributor

The appack_max_dist_th cli option has a useful regex based interface which can be used in other parts of VPR, especially in AP. Generalized the interface so it can be used outside of the context of max distance thresholding.

Used this general interface to pass in a target density per physical tile type. This spoofs the capacity into being smaller than it appears which tells the partial legalizer to not fill the tiles beyond the capacity.

Setting the target density to interesting values revealed a bug in the partial legalizer regarding numerical precision when computing the prefix sum. Changed the underlying data type within the prefix sum class used into fixed-point which resolved the issue.

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool docs Documentation lang-cpp C/C++ code labels Jun 17, 2025
@AlexandreSinger AlexandreSinger requested a review from amin1377 June 18, 2025 02:24
@AlexandreSinger
Copy link
Contributor Author

This did not change quality of results majorly. Some circuits minorly changed, but this resolved some hidden issues within the partial legalizer.

I did a quick sweep on VTR and found that setting the CLB target density to 0.8 improved post-FL HPWL by 9.8% and post-FL CPD by 2.7%; however basically a tie for post-routed HPWL adn CPD

Trying a 0.8 target density for LABs on Titan achieved similar results. I think more tuning is needed before we pull the trigger on a specific target density. For now, this option will make performing sweeps in the future much easier.

Copy link
Contributor

@amin1377 amin1377 left a comment

Choose a reason for hiding this comment

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

Thanks, Alex!

The `appack_max_dist_th` cli option has a useful regex based interface
which can be used in other parts of VPR, especially in AP. Generalized
the interface so it can be used outside of the context of max distance
thresholding.

Used this general interface to pass in a target density per physical
tile type. This spoofs the capacity into being smaller than it appears
which tells the partial legalizer to not fill the tiles beyond the
capacity.

Setting the target density to interesting values revealed a bug in the
partial legalizer regarding numerical precision when computing the
prefix sum. Changed the underlying data type within the prefix sum class
used into fixed-point which resolved the issue.
@AlexandreSinger
Copy link
Contributor Author

Thanks for the review @amin1377 , please let me know if you have any further comments!

@AlexandreSinger AlexandreSinger merged commit e097368 into master Jun 19, 2025
33 checks passed
@AlexandreSinger AlexandreSinger deleted the feature-ap-cli branch June 19, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants