-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add safe simplify for expressions that compares random assignments before and after. #918
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #918 +/- ##
==========================================
+ Coverage 91.42% 91.48% +0.05%
==========================================
Files 94 94
Lines 13581 13671 +90
Branches 13581 13671 +90
==========================================
+ Hits 12417 12507 +90
Misses 1049 1049
Partials 115 115 ☔ View full report in Codecov by Sentry. |
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.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2
.
Benchmark suite | Current: f475a85 | Previous: cd8b37b | Ratio |
---|---|---|---|
iffts/simd ifft/28 |
1289757786 ns/iter (± 27177876 ) |
643771030 ns/iter (± 19147376 ) |
2.00 |
merkle throughput/simd merkle |
29234038 ns/iter (± 430219 ) |
13712527 ns/iter (± 579195 ) |
2.13 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @shaharsamocha7
7414829
to
a459c48
Compare
859f7be
to
9e6576f
Compare
d13bc18
to
a198090
Compare
a198090
to
f84268d
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.
Reviewable status: 0 of 1 files reviewed, 6 unresolved discussions (waiting on @Alon-Ti)
crates/prover/src/constraint_framework/expr.rs
line 196 at r2 (raw file):
} pub fn simplify(&self) -> Self {
Document
And put note that
Code quote:
pub fn simplify(&self) -> Self {
crates/prover/src/constraint_framework/expr.rs
line 391 at r2 (raw file):
HashMap<String, BaseField>, HashMap<String, SecureField>, );
move above ExprVariables
Code quote:
pub type ExprVarAssignment = (
HashMap<(usize, usize, isize), BaseField>,
HashMap<String, BaseField>,
HashMap<String, SecureField>,
);
crates/prover/src/constraint_framework/expr.rs
line 418 at r2 (raw file):
} pub fn randomize(&self) -> ExprVarAssignment {
Document
and maybe rename to random_assignment? WDYT?
Code quote:
pub fn randomize(&self) -> ExprVarAssignment {
crates/prover/src/constraint_framework/expr.rs
line 181 at r1 (raw file):
} pub fn simplify(&self) -> Self {
rename to unsafe
and document that this shouldn't be used and refer to the simplify function
Code quote:
pub fn simplify(&self) -> Self {
crates/prover/src/constraint_framework/expr.rs
line 248 at r1 (raw file):
pub fn random_eval(&self) -> BaseField { let assignment = self.collect_variables().randomize();
Assert that assignment.2 is empty?
Code quote:
let assignment = self.collect_variables().randomize();
crates/prover/src/constraint_framework/expr.rs
line 381 at r1 (raw file):
#[derive(Default)] pub struct ExprVariables {
Document
Code quote:
pub struct ExprVariables {
f84268d
to
484a7d8
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.
Reviewable status: 0 of 1 files reviewed, 6 unresolved discussions (waiting on @shaharsamocha7)
crates/prover/src/constraint_framework/expr.rs
line 181 at r1 (raw file):
Previously, shaharsamocha7 wrote…
rename to unsafe
and document that this shouldn't be used and refer to the simplify function
Done.
crates/prover/src/constraint_framework/expr.rs
line 248 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Assert that assignment.2 is empty?
Done.
crates/prover/src/constraint_framework/expr.rs
line 381 at r1 (raw file):
Previously, shaharsamocha7 wrote…
Document
Done.
crates/prover/src/constraint_framework/expr.rs
line 196 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Document
And put note that
Done.
crates/prover/src/constraint_framework/expr.rs
line 391 at r2 (raw file):
Previously, shaharsamocha7 wrote…
move above ExprVariables
Done.
crates/prover/src/constraint_framework/expr.rs
line 418 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Document
and maybe rename to random_assignment? WDYT?
Done.
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.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Alon-Ti)
crates/prover/src/constraint_framework/expr.rs
line 418 at r2 (raw file):
Previously, Alon-Ti wrote…
Done.
Also write that this function uses only for tests.
Could we define it with cfg(tests) (not sure If I already suggested this)
crates/prover/src/constraint_framework/expr.rs
line 1043 at r3 (raw file):
let full_eval = expr.eval_expr::<AssertEvaluator<'_>, _, _, _>(&columns, &vars, &ext_vars); let simplified_eval = expr .unchecked_simplify()
why not just call simplify here?
Code quote:
unchecked_simplify
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Alon-Ti)
before and after.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7)
crates/prover/src/constraint_framework/expr.rs
line 418 at r2 (raw file):
Previously, shaharsamocha7 wrote…
Also write that this function uses only for tests.
Could we define it with cfg(tests) (not sure If I already suggested this)
It's not just for tests though, it should run every time an expression is simplified, including (especially) real use cases.
484a7d8
to
f475a85
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.
Reviewable status: 0 of 1 files reviewed, all discussions resolved (waiting on @Alon-Ti)
Merge activity
|
before and after.