Skip to content

[Place] Added an Initial Placement Checkpoint - #3233

Closed
AlexandreSinger wants to merge 1 commit into
verilog-to-routing:masterfrom
AlexandreSinger:feature-place-initial-checkpoint
Closed

[Place] Added an Initial Placement Checkpoint#3233
AlexandreSinger wants to merge 1 commit into
verilog-to-routing:masterfrom
AlexandreSinger:feature-place-initial-checkpoint

Conversation

@AlexandreSinger

Copy link
Copy Markdown
Contributor

I found that the annealer may sometimes pick a temperature so high that it destroys the quality of the initial placement. This behavior is most aparent with the AP flow, since its initial placement quality is much better than the default flow.

Added a checkpoint at the start of the anneal that saves the initial placement and, after 20 iterations, if the quality of the current anneal is worse than the initial placement, it will restore that placement and continue at that temperature.

This is the last change that I had locally for the standard AP flow.

I found that the annealer may sometimes pick a temperature so high that
it destroys the quality of the initial placement. This behavior is most
aparent with the AP flow, since its initial placement quality is much
better than the default flow.

Added a checkpoint at the start of the anneal that saves the initial
placement and, after 20 iterations, if the quality of the current anneal
is worse than the initial placement, it will restore that placement and
continue at that temperature.
@github-actions github-actions Bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Aug 12, 2025
@AlexandreSinger

AlexandreSinger commented Aug 12, 2025

Copy link
Copy Markdown
Contributor Author

Results on AP Titan (no fixed blocks, gaussian blur excluded):

circuit post_gp_hpwl post_fl_hpwl post_dp_hpwl total_wirelength post_gp_cpd post_fl_cpd post_dp_cpd crit_path_delay
LU230_stratixiv_arch_timing.blif 1.00 1.00 0.98 0.98 1.00 1.00 1.00 0.97
LU_Network_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
SLAM_spheric_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
bitcoin_miner_stratixiv_arch_timing.blif 1.00 1.00 0.95 0.95 1.00 1.00 0.79 0.92
bitonic_mesh_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
cholesky_bdti_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
cholesky_mc_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
dart_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
denoise_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
des90_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
directrf_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
gsm_switch_stratixiv_arch_timing.blif 1.00 1.00 1.04 1.03 1.00 1.00 1.06 1.07
mes_noc_stratixiv_arch_timing.blif 1.00 1.00 1.01 1.01 1.00 1.00 1.08 1.05
minres_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
neuron_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
openCV_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
segmentation_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
sparcT1_chip2_stratixiv_arch_timing.blif 1.00 1.00 0.96 0.97 1.00 1.00 1.03 1.09
sparcT1_core_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
sparcT2_core_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
stap_qrd_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
stereo_vision_stratixiv_arch_timing.blif 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
gaussianblur_stratixiv_arch_timing.blif 1.00 1.00 0.00 0.00 1.00 1.00 0.00 0.00
                 
  1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00

The run time did not change by much. For most circuits this optimization had no affect; however, for some of the largest circuits this improved the quality of both WL and CPD by a noticeable amount.

@AlexandreSinger

Copy link
Copy Markdown
Contributor Author

@amin1377 I am collecting results before and after on the default VTR flow to check for any runtime or quality degredation on the default flow. That should be done this evening. Please review when you have a moment.

Do not feel that we have to merge this in if you have issues with it! The quality improvement I got from this optimization was small, so we can hold it back as we investigate this further.

@amin1377

Copy link
Copy Markdown
Contributor

@AlexandreSinger When you have the results for the default flow, I’d appreciate it if you could share them here. Also, as we discussed earlier, I’m not a big fan of disrupting SA by starting from a completely different point midway through the anneal. I’d be curious to hear what @vaughnbetz thinks about this as well.

@AlexandreSinger

Copy link
Copy Markdown
Contributor Author

We are putting this PR on ice for a bit as I explore better methods of estimating an initial temperature.

@amin1377 If you are curious, I can show you what I am working on. The goal is to predict the initial temperature instead of back-tracking.

@AlexandreSinger AlexandreSinger changed the title [Place] Added an Initial Placement Checkpoint [WIP][Place] Added an Initial Placement Checkpoint Aug 26, 2025
@AlexandreSinger
AlexandreSinger marked this pull request as draft August 26, 2025 13:46
@AlexandreSinger AlexandreSinger changed the title [WIP][Place] Added an Initial Placement Checkpoint [Place] Added an Initial Placement Checkpoint Aug 26, 2025
@AlexandreSinger

Copy link
Copy Markdown
Contributor Author

This has been somewhat superceded by the equilibrium initial temperature estimation method added in #3271

Instead of using a checkpoint, we can do a better job estimating the initial temperature.

@AlexandreSinger
AlexandreSinger deleted the feature-place-initial-checkpoint branch September 27, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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