-
Notifications
You must be signed in to change notification settings - Fork 415
Refactor place.cpp Part I #1529
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
Refactor place.cpp Part I #1529
Conversation
…the VPR placer. Refactored place.cpp based on the moved global structures by moving certain interrelated routines into other (new) files.
Hi @vaughnbetz @HackerFoo , this is a PR in progress. Please drop by and leave some comments when you are available so that I can fix potential issues as early as possible! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Bill, thanks!
The style and commenting looks good. My two main comments (details embedded) are:
- Please run cpu tests regularly and attach them as you do this refactoring. I gave one example above of a particularly tricky run time impact (pointer alias analysis) which is impacted by the scope of the variables used in key loops and if their address has ever been taken. Hard to reason about, so good to check regularly.
- Splitting into multiple files is very good. I think it's good to think about what code should go in each. For example, is place.cpp only for annealing? (I think it should be). place_utils is for utilities that are reasonably general and may be useful for more than one placement algorithm (e.g. anneal and analytic). Putting those guidelines in the comments will help future developers stick with your organization.
@@ -83,10 +85,6 @@ using std::min; | |||
#define UPDATED_ONCE 'U' | |||
#define GOT_FROM_SCRATCH 'S' | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to add a comment about what should go in this file. (This is an annealing based, cluster-level placer. This file ...)
Titan benchmark run001@commit bdaf63c: https://drive.google.com/file/d/1F1U-P6b6LLMa3rCzoPEeeJZjWBgqaiGE/view?usp=sharing Comment: No runtime or performance degradation. |
Great, thanks Bill. Should this be merged now? |
I suggest addressing the comments I have in the review (which aren't too big, pretty much all commenting I think) and then we merge. After that you can do another PR for more refactoring (if you have the time), but probably best to do this in stages. What do you think? |
Doing this in multiple stages sounds good. I'll just reference this PR in the new PR. |
Sounds good. Let me know when the comments above are addressed and I'll merge this. |
Hi @vaughnbetz, I added more comments for the override delay model class. Regarding comments on what should be included in place.cpp, I think maybe it's more suitable for me to do that once the refactorization is mostly done. QoR test can be skipped since I only changed comments. This PR can be merged now. The next step for me is to shorten the argument lists for various core placer routiners. |
Great, thanks Bill. |
Description
PR in progress. More to come...
Motivation and Context
Refactor place.cpp to modularize it and reduce its length and complexity.
Types of changes