Skip to content
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

Formal Expr logup variables. #887

Merged
merged 1 commit into from
Nov 18, 2024
Merged

Formal Expr logup variables. #887

merged 1 commit into from
Nov 18, 2024

Conversation

Alon-Ti
Copy link
Contributor

@Alon-Ti Alon-Ti commented Nov 14, 2024

No description provided.

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 0 of 2 files reviewed, 5 unresolved discussions (waiting on @Alon-Ti)


crates/prover/src/constraint_framework/expr.rs line 30 at r1 (raw file):

    SecureCol([Box<Expr>; 4]),
    Const(BaseField),
    Var(String),

consider to rename

Suggestion:

ExternalVar(String),

crates/prover/src/constraint_framework/expr.rs line 30 at r1 (raw file):

    SecureCol([Box<Expr>; 4]),
    Const(BaseField),
    Var(String),

Should it also help with preprocessed columns?
Document

Code quote:

Var(String),

crates/prover/src/constraint_framework/expr.rs line 155 at r1 (raw file):

    let z = Expr::Var(relation.get_name().to_owned() + "_z");
    let alpha_powers = (0..relation.get_size())
        .map(|i| Expr::Var(relation.get_name().to_owned() + "_alpha" + &i.to_string()));

Can you put those strings as consts in the top of the function?

Suggestion:

"_alpha", "z"

crates/prover/src/constraint_framework/expr.rs line 232 at r1 (raw file):

                     values,
                 }| {
                    Fraction::new(multiplicity.clone(), combine_formal(*relation, values))

Can't it use the default impl for add_to_relation?
this is because the combine_formal?

Code quote:

Fraction::new(multiplicity.clone(), combine_formal(*relation, values))

crates/prover/src/constraint_framework/expr.rs line 333 at r1 (raw file):

                                            interaction: 2,
                                            idx: 5,
                                            offset: 18446744073709551615

Why we got this nubmer? (1 << 64)

Code quote:

offset: 18446744073709551615

@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace2 branch from 7d3d676 to 68b27b7 Compare November 17, 2024 07:43
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace2 branch from 68b27b7 to 599a366 Compare November 17, 2024 09:53
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace2 branch from 599a366 to cf2af5f Compare November 17, 2024 11:00
@Alon-Ti Alon-Ti force-pushed the alont/formal-expr-logup branch 2 times, most recently from b8d7a09 to 2601e11 Compare November 17, 2024 11:52
Copy link
Contributor Author

@Alon-Ti Alon-Ti left a 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 2 files reviewed, 5 unresolved discussions (waiting on @shaharsamocha7)


crates/prover/src/constraint_framework/expr.rs line 30 at r1 (raw file):

Previously, shaharsamocha7 wrote…

consider to rename

Param?


crates/prover/src/constraint_framework/expr.rs line 30 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Should it also help with preprocessed columns?
Document

Preprocessed columns are just columns that exist in the trace, I think the expr evaluator doesn't care how they're generated and who has access to them, at least until we have named columns in general.


crates/prover/src/constraint_framework/expr.rs line 155 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Can you put those strings as consts in the top of the function?

Done.


crates/prover/src/constraint_framework/expr.rs line 232 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Can't it use the default impl for add_to_relation?
this is because the combine_formal?

Yes. combine is a property of the relation itself, so it can't vary by evaluator.


crates/prover/src/constraint_framework/expr.rs line 333 at r1 (raw file):

Previously, shaharsamocha7 wrote…

Why we got this nubmer? (1 << 64)

Done.

@codecov-commenter
Copy link

codecov-commenter commented Nov 17, 2024

Codecov Report

Attention: Patch coverage is 99.36709% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.85%. Comparing base (3a88b3a) to head (9037ea4).
Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
crates/prover/src/constraint_framework/expr.rs 99.35% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #887      +/-   ##
==========================================
+ Coverage   91.61%   91.85%   +0.24%     
==========================================
  Files          93       93              
  Lines       12901    13053     +152     
  Branches    12901    13053     +152     
==========================================
+ Hits        11819    11990     +171     
+ Misses        967      948      -19     
  Partials      115      115              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link

@github-actions github-actions bot left a 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: 9037ea4 Previous: f6214d1 Ratio
merkle throughput/simd merkle 32211634 ns/iter (± 488417) 14690867 ns/iter (± 434150) 2.19

This comment was automatically generated by workflow using github-action-benchmark.

CC: @shaharsamocha7

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @Alon-Ti)


crates/prover/src/constraint_framework/expr.rs line 30 at r1 (raw file):

Previously, Alon-Ti wrote…

Preprocessed columns are just columns that exist in the trace, I think the expr evaluator doesn't care how they're generated and who has access to them, at least until we have named columns in general.

so it should access them by index same as any other column?


crates/prover/src/constraint_framework/expr.rs line 30 at r2 (raw file):

    SecureCol([Box<Expr>; 4]),
    Const(BaseField),
    /// A parameter external to the AIR, for example the interaction elements of a relation.

why is it called external?

Suggestion:

/// External parameter to the AIR, for example the interaction elements of a relation.

@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace2 branch 2 times, most recently from 52d362d to 92fe59a Compare November 17, 2024 15:17
@Alon-Ti Alon-Ti changed the base branch from alont/generalize-gen-interaction-trace2 to graphite-base/887 November 18, 2024 07:41
@Alon-Ti Alon-Ti changed the base branch from graphite-base/887 to dev November 18, 2024 07:42
Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @Alon-Ti)

Copy link
Collaborator

@shaharsamocha7 shaharsamocha7 left a 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.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alon-Ti)

@Alon-Ti Alon-Ti merged commit 96f7025 into dev Nov 18, 2024
18 of 19 checks passed
Copy link
Contributor Author

Alon-Ti commented Nov 18, 2024

Merge activity

  • Nov 18, 11:45 AM EST: A user merged this pull request with Graphite.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants