Skip to content

[AP][PartialLegalizer] Added Bi-Partitioning Spreader #2917

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

Conversation

AlexandreSinger
Copy link
Contributor

Bi-partitioning spreading is a technique where minimum spanning windows are formed around overfilled regions of the device such that the capacity of the bins within the window is larger than the utilization of the bins within the window. These windows are then successively partitioned, moving the blocks to the different partitions, until the window is small enough. Due to its divide and conquer nature, this algorithm tends to be very fast.

Created a basic version of this algorithm which does not take into account the different types of blocks being spread. It worked suprisingly well, giving better QoR and runtime than the original spreader that I decided to merge this in immediately. In the future, will add these features.

Kept the old spreader in as a separate Global Placer as it may be interesting to compare since the old multi-commodity flow-based approach should, in theory, do a better job spreading (at the expense of runtime). This old spreader may also be interesting to add into other stages of the flow. Added tests to keep this spreader from regressing.

The results for this version, compared to other changes to the AP flow:
image
image
The runtime saw the most notable improvement. The AP flow is now faster than the default flow by a considerable amount on larger circuits. The WL and timing are still worst than the default flow, but have improved over the prior AP flow. The number of routing failures went down for the VTR circuits, but when up for the MCNC circuits.

A lot can be done to improve this spreader; but the results are good enough to bring this in immediately. It also speeds up the flow greatly, which makes it easier to test on larger benchmarks like Koios and Titan.

@AlexandreSinger
Copy link
Contributor Author

@amin1377 FYI

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool docs Documentation lang-cpp C/C++ code labels Mar 2, 2025
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

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

Looks good; a few comments.

@AlexandreSinger AlexandreSinger force-pushed the feature-ap-partial-legalizer branch from 4b9c289 to dace763 Compare March 5, 2025 04:21
Bi-partitioning spreading is a technique where minimum spanning windows
are formed around overfilled regions of the device such that the
capacity of the bins within the window is larger than the utilization of
the bins within the window. These windows are then successively
partitioned, moving the blocks to the different partitions, until the
window is small enough. Due to its divide and conquer nature, this
algorithm tends to be very fast.

Created a basic version of this algorithm which does not take into
account the different types of blocks being spread. It worked
suprisingly well, giving better QoR and runtime than the original
spreader that I decided to merge this in immediately. In the future,
will add these features.

Kept the old spreader in as a separate Global Placer as it may be
interesting to compare since the old multi-commodity flow-based approach
should, in theory, do a better job spreading (at the expense of
runtime). This old spreader may also be interesting to add into other
stages of the flow. Added tests to keep this spreader from regressing.
@AlexandreSinger AlexandreSinger force-pushed the feature-ap-partial-legalizer branch from dace763 to 78f3632 Compare March 10, 2025 15:27
@AlexandreSinger AlexandreSinger merged commit eb54084 into verilog-to-routing:master Mar 10, 2025
36 checks passed
@AlexandreSinger AlexandreSinger deleted the feature-ap-partial-legalizer branch March 10, 2025 16:20
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 libvtrutil VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants