-
Notifications
You must be signed in to change notification settings - Fork 0
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
Various fixes for benchmarks #62
Conversation
3f79ff1
to
a169a98
Compare
a169a98
to
4b9feca
Compare
…versions of the subcomponent
1fd2d91
to
c1ee0be
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.
A few comments/questions while I work through the rest of the changes.
// "loop.body" function, this branch is dead code, thus no parameter was added | ||
// to the function to reference the destination of this StoreBucket and the | ||
// location information was not updated so there is an invalid parameter reference | ||
// that causes 'functions.rs::get_arg_ptr' to crash, but it's in dead code. |
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.
Maybe update the comment here since we're not crashing at get_arg_ptr
anymore.
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.
Oof, I added the checks but didn't even put the correct command at the start to use the checks.
//CHECK-NOT: define void @..generated..loop.body.[[[0-9]+]]( | ||
//CHECK: define void @..generated..loop.body.[[[0-9]+]].T( | ||
//CHECK-NOT: define void @..generated..loop.body.[[[0-9]+]]( | ||
//CHECK: define void @..generated..loop.body.[[[0-9]+]].F.T( |
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.
I'm a little confused why we end up generating:
@..generated..loop.body.[[[0-9]+]].T(...)
@..generated..loop.body.[[[0-9]+]].F(...)
@..generated..loop.body.[[[0-9]+]].F(...)
for the first 3 iterations of the unrolled loop, but
@..generated..loop.body.[[[0-9]+]].F.T(...)
@..generated..loop.body.[[[0-9]+]].F.T(...)
@..generated..loop.body.[[[0-9]+]].F.T(...)
for the last three iterations. Shouldn't we be able to generate
@..generated..loop.body.[[[0-9]+]].F(...)
@..generated..loop.body.[[[0-9]+]].F(...)
@..generated..loop.body.[[[0-9]+]].F(...)
For the last three iterations?
There also seems to be a bug here, because if I change OR
to:
template OR() {
signal input a;
a === 0;
}
I find that OR_0_run
is only called by @..generated..loop.body.[[[0-9]+]].F.T
and not @..generated..loop.body.[[[0-9]+]].F
or @..generated..loop.body.[[[0-9]+]].F.T
, so the first three iterations end up omitting the body of OR_0_Run
.
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.
Yeah, it really should have 6 calls to the run function. Part of what's going on here is addressed in some of the other PRs so I'll make a JIRA ticket to re-check this after all of this mess is merged in.
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.
circuit_passes/src/bucket_interpreter/env/extracted_func_env.rs
Outdated
Show resolved
Hide resolved
circuit_passes/src/bucket_interpreter/env/extracted_func_env.rs
Outdated
Show resolved
Hide resolved
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.
I think I'm good with this; it'd be helpful to get this merged in with the other PR so we can have a more unified view of everything.
* skip body extraction when the loop has 0 iterations * Modify interpreter to distinguish between circom functions and loop body functions * [VAN-676] duplicate extracted functions when flattening branch buckets * [VAN-670] generate and flatten subcmp counter/run * impl Debug for Env to be more friendly, expand on test case comment * remove debug println * fix: conditions not flattening in non-generated methods * [VAN-582] properly convert mapped to indexed when there are multiple versions of the subcomponent * fix XFAIL test outputs so they pass * add test cases * handle CallBucket return case in mapped_to_indexed * fix body_extractor assertion failure * fix segfault from improper GEP * use BucketId as key to speed up SimplificationPass * fix function name to reflect actual usage * Remove functions that cannot be reached from any template Co-authored-by: Daniel Dominguez <[email protected]>
* skip body extraction when the loop has 0 iterations * Modify interpreter to distinguish between circom functions and loop body functions * [VAN-676] duplicate extracted functions when flattening branch buckets * [VAN-670] generate and flatten subcmp counter/run * impl Debug for Env to be more friendly, expand on test case comment * remove debug println * fix: conditions not flattening in non-generated methods * [VAN-582] properly convert mapped to indexed when there are multiple versions of the subcomponent * fix XFAIL test outputs so they pass * add test cases * handle CallBucket return case in mapped_to_indexed * fix body_extractor assertion failure * fix segfault from improper GEP * use BucketId as key to speed up SimplificationPass * fix function name to reflect actual usage * Remove functions that cannot be reached from any template Co-authored-by: Daniel Dominguez <[email protected]>
No description provided.