-
Notifications
You must be signed in to change notification settings - Fork 101
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
PoC for two passes of pilopt #2535
base: main
Are you sure you want to change the base?
Conversation
|
||
fn tune_analyzed_pil(&self, pil: Analyzed<F>) -> Analyzed<F> { | ||
// TODO: currently defaults to the identity function | ||
// Move `bus_multi_linker` calls here in the future | ||
pil | ||
} |
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.
This will be an API for BackendFactory instead of Backend, because constructing Backend requires input witness etc., which aren't yet known at this point. BackendFactory is tied to the command line backend argument, which is appropriate for backend aware tuning which this API will include in the future.
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.
That makes sense I think!
pipeline/src/pipeline.rs
Outdated
let optimized_post_tuning_pil = if let Some(backend_type) = self.arguments.backend { | ||
let factory = backend_type.factory::<T>(); | ||
let backend_tuned_pil = factory.tune_analyzed_pil(optimized_pre_tuning_pil); | ||
powdr_pilopt::optimize(backend_tuned_pil) | ||
} else { | ||
optimized_pre_tuning_pil | ||
}; |
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.
If no backend argument is provided in the pipeline, this will simply return the same PIL (one pilopt pass instead of two).
I'm wondering if it would make sense to make this a separate pipeline step / artefact |
I also discussed this with @Schaeff and sounds good to us. :) |
This new version is also a PoC and will fail tests. The work flow is: pilopt -> backend specific tuning -> pilopt -> witgen and etc. In this design,
P.S. I made comments throughout the PR to mark these scenarios (which a lot more complicated than described above), so you can get a sense of the various cases we encounter here. |
After discussing with @Schaeff, we plan to have two pilopt passes, one before "backend aware tuning" and one after. In a chronological order:
multi_bus_linker
, which creates bus columns/constraints and phantom bus interaction.I do have one question: