-
Notifications
You must be signed in to change notification settings - Fork 422
Memory clean up to placer #1096
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
Closed
litghost
wants to merge
28
commits into
verilog-to-routing:master
from
litghost:memory_clean_up_to_placer
Closed
Memory clean up to placer #1096
litghost
wants to merge
28
commits into
verilog-to-routing:master
from
litghost:memory_clean_up_to_placer
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Initial results from baseline:
litghost:memory_clean_up_to_placer:
|
Overall CPU-wise most phases are the same, with a 15% CPU hit to the router. @kmurray Please review what is here already, as I expect I suspect I can recover most of the CPU time. Memory wins are ~40% of max_rss. |
42b115d
to
05bf83a
Compare
7 tasks
This was referenced Feb 3, 2020
Closed
9199d13
to
bfc5e11
Compare
Signed-off-by: Keith Rothman <[email protected]>
This should have a negliable performance impact, but this enables future changes to modify how rr nodes and rr edges are storaged. Signed-off-by: Keith Rothman <[email protected]>
This changes edge storage from an allocation array of struct per node to struct of array for all edge data. Several algorithms over edges that were previous per node per edge, but were actually just iteration over edges are now part of rr_node_storage. Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
This enables 16-byte alignment (4 nodes per cache line). Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Actually owning the string data is unneed as all data outlasts the formula data structure. Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
…ons. Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
The refactored functions: - get_rr_node_indices - label_wire_muxes - label_incoming_wires all are invoked inside of nested loops, resulting in a large (~10M+) number of repeated allocations and deallocations. The heap may be able to avoid fragmentation, but small code changes could result in fragmentation where none existed before. The change is to hoist the storage container (std::vector) outside of the loops so that once a high watermark is reached, no further allocations will result. Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
Signed-off-by: Keith Rothman <[email protected]>
bfc5e11
to
9aa4137
Compare
7 tasks
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
libvtrutil
tests
VPR
VPR FPGA Placement & Routing Tool
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is 3 patch sets together:
Combined with a set of patches designed to lower heap threshing between the start of rr graph construction and up to when the placer runs.
Related Issue
#1079
#1081
#1084
#1087
Motivation and Context
The changes made after #1085 are all aimed at lower the number of allocations made inside of hot loop, by hoisting the allocation to the root of the loops. This prevents allocation patterns that cause heap fragmentation.
How Has This Been Tested?
Types of changes
Checklist: