-
Notifications
You must be signed in to change notification settings - Fork 409
[APPack] Added Flat Placement Reconstruction #2870
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
[APPack] Added Flat Placement Reconstruction #2870
Conversation
6772e41
to
e879701
Compare
@vaughnbetz This has passed CI. I agree with the improvements discussed in the VTR meeting; however, I would like to merge this version in so I can add it to the AP flow. I can return to this project later to further improve it as needed. Although it looks like a lot of lines were modified, 900+ lines were added for a strong testcase for this work. Please review when you have a moment! |
e879701
to
53e90e6
Compare
There was a problem hiding this 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 suggestions.
...ssion_tests/vtr_reg_strong/strong_flat_placement/read_write/constraints/old_placement.fplace
Show resolved
Hide resolved
Added logic to the packer to reconstruct clusters from the flat placement, if one is provided. The packer will fall-back on the original packing algorithm if it runs out of options for candidates to cluster. Added logic to the initial placer to reconstruct the placement of each cluster from the flat placement, if one is provided. It will try to place the cluster at the centroid location of all atoms in a cluster, if it cannot place the cluster there it will fall-back on the original initial placement algorithm. Added a simple testcase to ensure the reading and writing of the flat placement file is working.
Updated comments and some variables names as per VB review.
53e90e6
to
42756cd
Compare
Added logic to the packer to reconstruct clusters from the flat placement, if one is provided. The packer will fall-back on the original packing algorithm if it runs out of options for candidates to cluster.
Added logic to the initial placer to reconstruct the placement of each cluster from the flat placement, if one is provided. It will try to place the cluster at the centroid location of all atoms in a cluster, if it cannot place the cluster there it will fall-back on the original initial placement algorithm.
Added a simple testcase to ensure the reading and writing of the flat placement file is working.
This resolves one of the problems discussed in issue #2868
This has been tested on all of the MCNC and VTR_chain benchmarks. The results below were collected by running default VTR (iteration 0), which generated a flat placement file. This flat placement file was passed back into VTR to reconstruct the clustering and initial placement (the SA annealer is then run), and another flat placement file is generated. This process is then iteratively repeated. This was run on fixed-size architectures (large enough so the limiting device utilization was not too high) with fixed channel widths equal to 1.3 times the minimum channel width.
MCNC (average over all benchmarks):
VTR_chain (averaged over all benchmarks):
The WL and CPD are calculated after running the SA.
The percent cluster errors is the number of clusters which contain an atom that was not placed in the same place as the other atoms in the cluster (according to the flat placement) divided by the total number of clusters in the netlist.
The percent atoms displaced is the number of atoms that were not placed in the correct spot (according to the flat placement) divided by the number of atoms in the netlist.
The average atom displacement is the average displacement of each atom from where it wanted to be in the flat placement.
Based on these results, reconstructing the clusters from a flat placement reduces the runtime of packing by 15%. The error between the reconstructed placement and the flat placement is less than 5% (some circuits are higher than others); however, the WL/CPD achieved remains stable. This implies that although the reconstruction is not perfect, it is still able to achieve similar QoR. This is due to this work falling back on the original packing / placement algorithms. Another thing to notice is that the error reduces over several iterations (eventually also getting 0% error on most circuits). This shows that we are able to reconstruct perfectly, aside from some small issues due to ordering early on (changing the order atoms are inserted into a cluster changes the legality of future insertions).
MCNC appears to have higher error than VTR_chain for reconstruction. I attribute this to the architecture. MCNC is a homogenous architecture (all LUTs). This means that it is likely for the reconstruction to swap atoms between clusters which changes the placement. However, even with this higher average error, the average displacement remains low and the CPD and WL remain stable.