-
Notifications
You must be signed in to change notification settings - Fork 53
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
Separate Inference and Promotion into Separate Passes #1871
Conversation
Awesome! BTW, the previous implementation of this kind of "fixup" logic is in |
Yeah, I actually use WithStatic already in the FixUp (I just changed the |
All sounds good, and the implementation looks great! As we discussed synchronously, this "fixup" behavior for backing out some cross-component inference seems like the right thing. The one thing I realized I don't completely understand about this is: I think the rule is (using your scenario above) we need to remove inferred latencies from B if B writes to A. I don't quite understand why writes are important in particular… I guess I would have expected the documentation for the function to say, like, "uses" or something. Is it just because any use involves a write to some input port (at least to the |
Yeah; in fact, I think my implementation was a bit imprecise (i.e., it removes the |
Makes sense; thanks for clarifying! This level of precision seems fine to leave to future work. 😃 |
Does this fix #1852? |
No, but I have a PR that's almost ready that will fix it. |
I'll merge this (I have more PRs coming, so I can adress any changes in those PRs as well). |
* progress * first try at separating passes * use helper function * better tests, cleaner code * existing tests passing * inference * updated code * clippy * clippy is annoying * fixup works now * fixup is fixed up * another fixup test * rewrite tests * cleaner code * commented code
This is the first step of the progress described in here.
Apologies for the really big PR, but a lot of it is just moving around code and slightly changing tests.
The main new thing is the fixup_timing function. Suppose component B instantiates component A. Suppose also that we infer component's A's latency, and use that to infer the latency of B. If we decide not to promote A, then we can the inference information in B is no longer valid. This
fixup_timing
function should account for that. I wrote the function so that it can also (hopefully) be applied to compaction when we need to re-infer components after we compact them. There are tests for this behavior it here and here