Skip to content

Remove extra copies in simple place delay model - #3731

Open
AmirhosseinPoolad wants to merge 4 commits into
masterfrom
fix_simple_delay_model_copy
Open

Remove extra copies in simple place delay model#3731
AmirhosseinPoolad wants to merge 4 commits into
masterfrom
fix_simple_delay_model_copy

Conversation

@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor

The simple place delay model uses the lookehead data to for getting the delay between tiles. Previously it would use the router delay profiler which copied a table from the lookahead and then it copied the table from the delay profiler into it's own table. This PR removes all the copying and makes the simple lookahead just use the lookahead's table instead.

The simple place delay model uses the lookehead data
to for getting the delay between tiles. Previously it would
use the router delay profiler which copied a table from
the lookahead and then it copied the table from the
delay profiler into it's own table. This commit removes
all the copying and makes the simple lookahead just use
the lookahead's table instead.
@github-actions github-actions Bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Jul 30, 2026
@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor Author

I plan to change the lookahead opin api to get from_loc and to_loc instead of dx and dy at some future point. This should make it possible to trivially use the (not existing in master yet) separable lookahead for placement without any changes to the place delay model code. This is the underlying reason for these changes.

@AmirhosseinPoolad

AmirhosseinPoolad commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

VTR Benchmarks:

  master.txt branch.txt
vtr_flow_elapsed_time 1 1.0068683353274
odin_synth_time    
parmys_synth_time 1 1.01183120604122
abc_depth 1 1
abc_synth_time 1 1.00330545097305
num_clb 1 1
num_memories 1 1
num_mult 1 1
max_vpr_mem 1 0.999708858165282
num_pre_packed_blocks 1 1
num_post_packed_blocks 1 1
device_grid_tiles 1 1
pack_time 1 1.00817398048951
placed_wirelength_est 1 1
place_time 1 1.02847906821588
placed_CPD_est 1 1
min_chan_width 1 1
routed_wirelength 1 1
min_chan_width_route_time 1 0.998546576330039
crit_path_routed_wirelength 1 1
critical_path_delay 1 1
geomean_nonvirtual_intradomain_critical_path_delay 1 1
crit_path_route_time 1 1.01540726592942

I think placement is slightly slower, which is due to the added virtual function call. I Could template the simple delay model with the lookahead to fix this.

@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor Author

After templating the place delay model:

  master2.txt branch2.txt
vtr_flow_elapsed_time 1.000 0.989
num_LAB 1.000 1.000
num_DSP 1.000 1.000
num_M9K 1.000 1.000
num_M144K 1.000 1.000
max_vpr_mem 1.000 1.000
num_pre_packed_blocks 1.000 1.000
num_post_packed_blocks 1.000 1.000
device_grid_tiles 1.000 1.000
pack_time 1.000 0.988
placed_wirelength_est 1.000 1.000
place_time 1.000 0.984
placed_CPD_est 1.000 1.000
routed_wirelength 1.000 1.000
critical_path_delay 1.000 1.000
geomean_nonvirtual_intradomain_critical_path_delay 1.000 1.000
crit_path_route_time 1.000 0.982

VPR executable size increased by 3KBs, or 0.02% (not 2%).

I personally think it's fine, but I can also investigate using std::variant and std::visit which essentially does a switch-case instead of using a vtable if the template code is too complicated.

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.

1 participant