-
Notifications
You must be signed in to change notification settings - Fork 55
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
LEM circuit refactor #1184
LEM circuit refactor #1184
Conversation
cbc2429
to
27139c8
Compare
!benchmark --features cuda |
Benchmark for 313180aClick to view benchmark
|
|
!benchmark --features cuda |
Benchmark for 313180aClick to view benchmark
|
|
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.
Unfortunately the slowdown seems to be consistent so I'm blocking the merge.
Meanwhile, there are other minor changes on this PR that could be factored out to a smaller PR
27139c8
to
771eaa5
Compare
!benchmark --features cuda |
Benchmark for 867f0c2Click to view benchmark
|
|
!benchmark --features cuda |
Benchmark for 867f0c2Click to view benchmark
|
|
e9303e0
to
bf93d4e
Compare
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.
Approved contingent on @arthurpaulino's sign-off.
|
||
/// The collection of all return values and `not_dummy`s of all | ||
/// branches in a block. | ||
struct BranchOutputs<F: LurkField>(Vec<(Boolean, Vec<AllocatedPtr<F>>)>); |
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.
Nits:
- I think a better name for this is either
BlockOutputs
orBranchesOutputs
(I prefer the former). - Also, why wrap it with a struct? A type alias would do
This PR solves the first point in #1051. Instead of always pre-allocating output pointers we choose to do this based on whether there's a branch or not. This makes the use of auxiliary funcs cheaper. Not very important for the eval step right now, but it can be a significant improvement for small funcs, specially in the context of coroutines.