Skip to content

[APPack] Tuned Up APPack Code - #3231

Merged
AlexandreSinger merged 2 commits into
verilog-to-routing:masterfrom
AlexandreSinger:feature-appack-update
Aug 12, 2025
Merged

[APPack] Tuned Up APPack Code#3231
AlexandreSinger merged 2 commits into
verilog-to-routing:masterfrom
AlexandreSinger:feature-appack-update

Conversation

@AlexandreSinger

Copy link
Copy Markdown
Contributor

This is the second PR that brings in private tunings for the Triple-AP work into VTR master.

These are all the tuning changes to the APPack algorithm. This comes with changes to the max displacement threshold values, improved fall-back logic, and better unrelated clustering logic.

Also fixed a small issue in the delay derivative calculation of the analytical solver to explicitly handle boundary conditions of the derivative.

@github-actions github-actions Bot added VPR VPR FPGA Placement & Routing Tool libarchfpga Library for handling FPGA Architecture descriptions docs Documentation lang-cpp C/C++ code labels Aug 10, 2025
This is the second PR that brings in private tunings for the Triple-AP
work into VTR master.

These are all the tuning changes to the APPack algorithm. This comes
with changes to the max displacement threshold values, improved
fall-back logic, and better unrelated clustering logic.

Also fixed a small issue in the delay derivative calculation of the
analytical solver to explicitly handle boundary conditions of the
derivative.
@AlexandreSinger

AlexandreSinger commented Aug 11, 2025

Copy link
Copy Markdown
Contributor Author

Results on Titan (no fixed blocks, where baseline is the AP flow before this change):

Metric Improvement over baseline AP
post_fl_hpwl 1.01
post_dp_hpwl 0.97
total_wirelength 0.97
post_fl_cpd 1.01
post_dp_cpd 1.00
crit_path_delay 0.98
ap_gp_runtime 1.01
ap_fl_runtime 1.00
ap_dp_runtime 1.08
route_runtime 0.99
total_runtime 1.03
num_lab 1.07

Notice that the post FL CPD and WL did not change; however, the final CPD and WL improved by 2-3%. The cost of this is a 3% increase in run time. Looking at the run time breakdown, we can see that all of the time was lost in detailed placement (in the anneal). I attribute this to the number of LABs increasing by 7%. The optimizations that I have added to APPack allowed the packing to become less dense without becoming unfittable. This allows us to play more to the strengths of the annealer, while still packing things together based on the AP global placer.

Overall these changes are a win. I am ok with the run time hit in this case, since if we really want the run time back we can reduce the inner_num by 8%.

@vaughnbetz FYI

@AlexandreSinger

Copy link
Copy Markdown
Contributor Author

@amin1377 Please review when you have a moment. This is the last major change that I have locally to the AP flow. The only change left behind is the checkpointing change to the annealer, which I wanted to bring in a separate PR since I know it will be a bit contentious.

@amin1377 amin1377 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.

Thanks, Alex! Overall, it looks good to me. I just mainly asked to expand on some comments so that a novice like me can also understand what’s going on :)

Comment thread doc/src/vpr/command_line_usage.rst Outdated
Comment thread doc/src/vpr/command_line_usage.rst Outdated
Comment thread doc/src/vpr/command_line_usage.rst
Comment thread libs/libarchfpga/src/arch_util.cpp Outdated
Comment thread vpr/src/analytical_place/analytical_solver.cpp
Comment thread vpr/src/pack/appack_context.h
Comment thread vpr/src/pack/appack_max_dist_th_manager.h
Comment thread vpr/src/pack/appack_unrelated_clustering_manager.cpp Outdated
Comment thread vpr/src/pack/appack_unrelated_clustering_manager.h Outdated

@amin1377 amin1377 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.

Thanks, Alex! It looks good to me. Feel free to merge it once you’ve completed all the changes you wanted to make.

@AlexandreSinger
AlexandreSinger merged commit 5596b80 into verilog-to-routing:master Aug 12, 2025
30 checks passed
@AlexandreSinger
AlexandreSinger deleted the feature-appack-update branch August 12, 2025 14:21
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 libarchfpga Library for handling FPGA Architecture descriptions VPR VPR FPGA Placement & Routing Tool

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants