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

Separated Xor table types. #883

Merged
merged 1 commit into from
Nov 23, 2024
Merged

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
Contributor Author

Alon-Ti commented Nov 14, 2024

@Alon-Ti Alon-Ti marked this pull request as ready for review November 14, 2024 09:27
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace2 branch from a8f6446 to 7d3d676 Compare November 14, 2024 09:33
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace3 branch from 5b1fa6b to eb215aa Compare November 14, 2024 09:33
Copy link
Collaborator

@ohad-starkware ohad-starkware 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 19 files reviewed, 2 unresolved discussions (waiting on @Alon-Ti and @shaharsamocha7)


crates/prover/src/examples/state_machine/components.rs line 51 at r1 (raw file):

        eval.add_to_relation(&[
            RelationEntry::new(&self.lookup_elements, E::EF::one(), &input_state),

unrelated to this pr, whiy is multiplicity EF and not F? wouldn't that conflict with future optimizations to these muls?


crates/prover/src/constraint_framework/mod.rs line 121 at r1 (raw file):

    fn add_to_relation<Relation: RelationType<Self::F, Self::EF>>(
        &mut self,
        _entries: &[RelationEntry<'_, Self::F, Self::EF, Relation>],

crates/prover/src/constraint_framework/mod.rs line 127 at r1 (raw file):

}

pub trait EvalAtRowWithLogup {

are you planning to kill EvalAtRow?
does it make sense to have both and still have add_to_relation for the regular Eval?
why not a super trait? (genuinely asking, don't know if it would work,)


crates/prover/src/constraint_framework/logup.rs line 92 at r1 (raw file):

/// Ensures that the LogupAtRow is finalized.
/// LogupAtRow should be finalized exactly once.
impl<F: Clone, EF: RelationEFTraitBound<F>> Drop for LogupAtRow<F, EF> {

non blocking

Suggestion:

 RelationEF

crates/prover/src/examples/blake/xor_table/gen.rs line 208 at r1 (raw file):

}

xor_table_gen!(xor12, XorElements12, 12, 4);

maybe these should be coupled with the eval macro?
non blocking

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 4 of 19 files at r1, all commit messages.
Reviewable status: 4 of 19 files reviewed, 3 unresolved discussions (waiting on @Alon-Ti and @ohad-starkware)


crates/prover/src/constraint_framework/mod.rs line 127 at r1 (raw file):

}

pub trait EvalAtRowWithLogup {

This trait shouldn't be implemented directly from outside of this module right?
It's only for the use of the framework itself. Can you document?

Maybe we should have a utils file in this folder so mod will only contain API traits.

Code quote:

pub trait EvalAtRowWithLogup {

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.95%. Comparing base (77de4d7) to head (5a1d139).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #883   +/-   ##
=======================================
  Coverage   91.95%   91.95%           
=======================================
  Files          93       93           
  Lines       13097    13097           
  Branches    13097    13097           
=======================================
  Hits        12043    12043           
  Misses        939      939           
  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: 174082a Previous: f6214d1 Ratio
merkle throughput/simd merkle 31468024 ns/iter (± 424557) 14690867 ns/iter (± 434150) 2.14

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

CC: @shaharsamocha7

Copy link
Collaborator

@ohad-starkware ohad-starkware 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: 4 of 19 files reviewed, 4 unresolved discussions (waiting on @Alon-Ti and @shaharsamocha7)


crates/prover/src/constraint_framework/mod.rs line 277 at r1 (raw file):

            )
            .collect();
        self.write_logup_frac(fracs.into_iter().sum());

redundant collect

Suggestion:

        let fracs = entries.iter().map(
            |RelationEntry {
                 relation,
                 multiplicity,
                 values,
             }| { Fraction::new(multiplicity.clone(), relation.combine(values)) },
        );
        self.write_logup_frac(fracs.sum());

Copy link
Collaborator

@ohad-starkware ohad-starkware left a comment

Choose a reason for hiding this comment

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

xor changes looking good

Reviewable status: 4 of 19 files reviewed, 4 unresolved discussions (waiting on @Alon-Ti and @shaharsamocha7)

@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-trace3 branch from eb215aa to b61d6c9 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-trace3 branch from b61d6c9 to cc7d9bd 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/generalize-gen-interaction-trace3 branch from cc7d9bd to 83cb64d Compare November 17, 2024 11:01
@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 force-pushed the alont/generalize-gen-interaction-trace3 branch from 83cb64d to 1ca045c Compare November 17, 2024 15:17
@Alon-Ti Alon-Ti changed the base branch from alont/generalize-gen-interaction-trace2 to graphite-base/883 November 18, 2024 07:41
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace3 branch from 1ca045c to d37ef1d Compare November 18, 2024 07:41
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 20 files reviewed, 4 unresolved discussions (waiting on @ohad-starkware and @shaharsamocha7)


crates/prover/src/examples/blake/xor_table/gen.rs line 208 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

maybe these should be coupled with the eval macro?
non blocking

Done.


crates/prover/src/constraint_framework/logup.rs line 92 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

non blocking

Reverted.


crates/prover/src/constraint_framework/mod.rs line 127 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

are you planning to kill EvalAtRow?
does it make sense to have both and still have add_to_relation for the regular Eval?
why not a super trait? (genuinely asking, don't know if it would work,)

Reverted.


crates/prover/src/constraint_framework/mod.rs line 127 at r1 (raw file):

Previously, shaharsamocha7 wrote…

This trait shouldn't be implemented directly from outside of this module right?
It's only for the use of the framework itself. Can you document?

Maybe we should have a utils file in this folder so mod will only contain API traits.

Reverted.


crates/prover/src/constraint_framework/mod.rs line 277 at r1 (raw file):

Previously, ohad-starkware (Ohad) wrote…

redundant collect

Reverted.


crates/prover/src/constraint_framework/mod.rs line 121 at r1 (raw file):

    fn add_to_relation<Relation: RelationType<Self::F, Self::EF>>(
        &mut self,
        _entries: &[RelationEntry<'_, Self::F, Self::EF, Relation>],

Reverted.

@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace3 branch from 89bac9f to 2a38450 Compare November 19, 2024 13:57
@Alon-Ti Alon-Ti force-pushed the alont/generalize-gen-interaction-trace3 branch from 2a38450 to 5a1d139 Compare November 19, 2024 14:01
Copy link
Collaborator

@ohad-starkware ohad-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: 0 of 20 files reviewed, 1 unresolved discussion (waiting on @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 1 of 1 files at r2, 2 of 6 files at r3, 15 of 17 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Alon-Ti)

@Alon-Ti Alon-Ti merged commit 4083523 into dev Nov 23, 2024
15 of 19 checks passed
Copy link
Contributor Author

Alon-Ti commented Nov 23, 2024

Merge activity

  • Nov 22, 11:20 PM 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.

5 participants