-
Notifications
You must be signed in to change notification settings - Fork 427
[Prepacking] Re-Designed Prepacker API #2703
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
[Prepacking] Re-Designed Prepacker API #2703
Conversation
90c3579
to
0f24140
Compare
The original Prepacker API created a lot of global variables which were confusing to work with and hard to maintain. Created a Prepacker class which maintains the state of the Prepacker and provides methods to access prepacking information. I also tried to remove the accesses to the global scope from within the prepacker to isolate it from the rest of VTR. This is in an attempt to make it easier to work with.
0f24140
to
8dd7795
Compare
@vaughnbetz This PR has passed CI. This PR abstracts prepacking into a single class which, when initialized, sets up internal variables for tracking molecules. The variables for tracking molecules used to be stored in the atom context; this has been replaced with an instance of the prepacker object which is initialized in the packing stage. I also removed all of the calls to g_vpr_ctx from the API, isolating it from the rest of the flow. All of this makes it easier to use prepacking in the analytical placement flow and makes it easier to maintain (changes in the packing flow should not break the AP flow). |
Looks very good; just a few commenting changes. |
Updated documentation based on Vaughn's comments. Also simplified the interface of getting a molecule from a block since it appears as though each block will only be contained within one molecule.
@vaughnbetz I have resolved your comments. I have found that, at least for the strong tests, each block will be contained in only one molecule. This matches what I think I see in the prepacker code. I have updated the API interface to reflect this and made it much more efficient by turning the lookups from a multimap ( I will run the VTR benchmarks soon (I want to ensure a good number of the CI tests complete) to get QoR results, I do not expect any slowdown or QoR change. |
For improved performance (and to simplify the interface further), changed the internal maps to VTR Vectors. Added asserts to ensure assumptions are maintained.
7ac6cd9
to
0408e7d
Compare
@vaughnbetz Here are the QoR results for VTR:
The change in parmys_synth_time seems to be caused by smaller circuits (such as Here is the raw data: When this passes CI, it should be good to merge unless you have any further comments. |
Looks good to me! |
@vaughnbetz Please merge when you get the chance! Its a bit of a large PR and I want to prevent it from regressing. My next PR will also depend on this one. |
The original Prepacker API created a lot of global variables which were confusing to work with and hard to maintain.
Created a Prepacker class which maintains the state of the Prepacker and provides methods to access prepacking information.
I also tried to remove the accesses to the global scope from within the prepacker to isolate it from the rest of VTR. This is in an attempt to make it easier to work with.