Skip to content

add flat idx to pb_graph_node , populate in alloc_and_load_pb_graph #2590

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

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

KA7E
Copy link
Contributor

@KA7E KA7E commented Jun 6, 2024

Added a flat_site_idx to pb_graph_node struct, along with code to populate it in alloc_and_load_pb_graph.

Description

As alloc_and_load_pb_graph builds the graph from the top down, each parent computes its child's flat index and passes it to them as an argument to alloc_and_load_ph_graph.
The child's flat site is computed by the parent as:
(parent's flat site)*(total children of this type) + child's sibling index.

Related Issue

Motivation and Context

This is used to help the legalizer place a molecule on a user specified site. It is better to store this value in the node than to recompute it over and over.

How Has This Been Tested?

Compared this value to locally computed value in the legalizer, which is then printed to a flat placement file and compared via a script. I tested on both StratixIV and ISPD Ultrascale architectures. In all cases, computed sites and sites stored in the pb_graph_node match.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool libarchfpga Library for handling FPGA Architecture descriptions lang-cpp C/C++ code labels Jun 6, 2024
@KA7E KA7E requested a review from vaughnbetz June 6, 2024 15:45
@KA7E
Copy link
Contributor Author

KA7E commented Jun 7, 2024

@vaughnbetz could you please review? Subsequent legalizer PRs depend on this.

@KA7E
Copy link
Contributor Author

KA7E commented Jun 12, 2024

QoR check running neuron:

Master VPR:
BB estimate of min-dist (placement) wire length: 609607
Placement estimated critical path delay (least slack): 7.36338 ns
Total wirelength: 778820, average net length: 15.3064
Final critical path delay (least slack): 7.63097 ns
The entire flow of VPR took 603.12 seconds (max_rss 2827.0 MiB)

Master VPR with legalizer-related modifications (this PR and others):
BB estimate of min-dist (placement) wire length: 609607
Placement estimated critical path delay (least slack): 7.36338 ns
Total wirelength: 778820, average net length: 15.3064
Final critical path delay (least slack): 7.63097 ns
The entire flow of VPR took 547.78 seconds (max_rss 2825.2 MiB)

@vaughnbetz
Copy link
Contributor

Thanks, that looks good. It's odd cpu time sped up by about 10%; probably a load issue I guess.

@vaughnbetz vaughnbetz merged commit d9dec1f into master Jun 12, 2024
102 checks passed
@vaughnbetz vaughnbetz deleted the add_flat_site_index_to_pg_graph_node branch June 12, 2024 13:59
@KA7E
Copy link
Contributor Author

KA7E commented Jun 12, 2024

The modified version was compiling while the baseline was running, but nothing else was happening while the modified version was running. I thought I had enough resources that this wouldn't matter, but maybe it impacted the runtime.

@vaughnbetz
Copy link
Contributor

vaughnbetz commented Jun 12, 2024 via email

@KA7E
Copy link
Contributor Author

KA7E commented Jun 12, 2024

It is not a laptop, it's a repurposed gaming server (that I like to use so I can control what else is running). If runtime is a concern I'm happy to re-run each all alone.

@vaughnbetz
Copy link
Contributor

I think it's OK ... the odds were low of a slowdown and this pushes them lower still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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