Skip to content
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

[Packer] Greedy Clustering Candidate Selector Class #2856

Conversation

AlexandreSinger
Copy link
Contributor

Outlined all of the logic related to selecting a candidate molecule to pack into a given cluster into its own class. This class will maintain the information required for computing gains and selecting the highest gain molecule to pack.

By separating out this logic, it makes it easier to modify and contribute to this code since it is now obvious where the code starts and where it ends.

I have also went through and tried to modernize anything I could (for example, replacing C-style arrays for vectors). This code still needs a lot more cleanup, but this PR will be a good stepping stone for future refactorings.

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Jan 10, 2025
@AlexandreSinger
Copy link
Contributor Author

QoR results for vtr_reg_qor_chain, run on my local machine:

  baseline_parse_results.txt gr_can_sel_parse_results.txt
vtr_flow_elapsed_time 1 0.932162601
odin_synth_time    
parmys_synth_time 1 0.933314613
abc_depth 1 1
abc_synth_time 1 0.936982841
num_clb 1 1
num_memories 1 1
num_mult 1 1
max_vpr_mem 1 1.000603156
num_pre_packed_blocks 1 1
num_post_packed_blocks 1 1
device_grid_tiles 1 1
pack_time 1 0.928684491
placed_wirelength_est 1 1
place_time 1 0.925694356
placed_CPD_est 1 1
min_chan_width 1 1
routed_wirelength 1 1
min_chan_width_route_time 1 0.933681889
crit_path_routed_wirelength 1 1
critical_path_delay 1 1
geomean_nonvirtual_intradomain_critical_path_delay 1 1
crit_path_route_time 1 0.950308163

It looks like my machine was loaded while running the baseline; however, what is important is that it looks like we get the exact same minimum channel width, CPD, and WL. This implies that my refactoring of the packer had no changes to the output clustering.

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, thanks!
Some suggested commenting updates, and some functional updates that can be deferred until after the initial merge. Should definitely get rid of (or create an issue for) the non-deterministic random number sequence when attraction groups are used.

vpr/src/pack/greedy_candidate_selector.h Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.h Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.h Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.h Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.h Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.cpp Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.cpp Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.cpp Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.cpp Outdated Show resolved Hide resolved
vpr/src/pack/greedy_candidate_selector.cpp Show resolved Hide resolved
Outlined all of the logic related to selecting a candidate molecule to
pack into a given cluster into its own class. This class will maintain
the information required for computing gains and selecting the highest
gain molecule to pack.

By separating out this logic, it makes it easier to modify and
contribute to this code since it is now obvious where the code starts
and where it ends.

I have also went through and tried to modernize anything I could
(for example, replacing C-style arrays for vectors). This code still
needs a lot more cleanup, but this PR will be a good stepping stone for
future refactorings.
@AlexandreSinger AlexandreSinger force-pushed the feature-packer-candidate-selector branch from 3eb9eff to 3defccf Compare January 13, 2025 22:27
@AlexandreSinger AlexandreSinger merged commit e46e9c2 into verilog-to-routing:master Jan 13, 2025
37 checks passed
@AlexandreSinger AlexandreSinger deleted the feature-packer-candidate-selector branch January 13, 2025 23:18
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