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

Add GKR implementation of Logup lookups #623

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented May 8, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2024

Codecov Report

Attention: Patch coverage is 93.05556% with 25 lines in your changes missing coverage. Please review.

Please upload report for BASE (dev@437ea59). Learn more about missing BASE report.

Files Patch % Lines
crates/prover/src/core/lookups/gkr_prover.rs 82.53% 11 Missing ⚠️
crates/prover/src/core/lookups/utils.rs 61.53% 10 Missing ⚠️
crates/prover/src/core/backend/cpu/lookups/gkr.rs 98.84% 0 Missing and 3 partials ⚠️
crates/prover/src/core/lookups/gkr_verifier.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev     #623   +/-   ##
======================================
  Coverage       ?   92.84%           
======================================
  Files          ?       82           
  Lines          ?    10933           
  Branches       ?    10933           
======================================
  Hits           ?    10151           
  Misses         ?      688           
  Partials       ?       94           

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

@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from 0aabbae to 53e9d4e Compare June 22, 2024 19:09
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from 789c3c9 to 9fbd265 Compare June 25, 2024 02:20
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from 53e9d4e to ccbe3b0 Compare June 25, 2024 02:20
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from 9fbd265 to 0cc0d79 Compare June 26, 2024 14:33
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from ccbe3b0 to 1945331 Compare June 26, 2024 14:33
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from 0cc0d79 to f8ff1d6 Compare July 8, 2024 04:43
Copy link
Contributor

@spapinistarkware spapinistarkware left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 8 files at r3, 2 of 2 files at r5, 1 of 1 files at r8, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson and @shaharsamocha7)


crates/prover/src/core/backend/cpu/lookups/gkr.rs line 180 at r8 (raw file):

) -> (SecureField, SecureField) {
    /// Represents the fraction `1 / x`
    struct Reciprocal {

I wonder if this is needed, or we can use Fraction with a constant numerator, and the compiler will optimizes with constant propagation...

Code quote:

struct Reciprocal

Copy link
Contributor

@spapinistarkware spapinistarkware 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: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson and @shaharsamocha7)

@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from f8ff1d6 to d846901 Compare July 11, 2024 14:05
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from 1945331 to 47caaef Compare July 11, 2024 14:05
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from d846901 to c3cede8 Compare July 11, 2024 14:35
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from 47caaef to ed6103f Compare July 11, 2024 14:35
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from c3cede8 to bdac672 Compare July 11, 2024 14:40
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from ed6103f to d9935c0 Compare July 11, 2024 14:40
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch 3 times, most recently from aebb34a to 2980f55 Compare July 14, 2024 14:30
Copy link
Contributor

@spapinistarkware spapinistarkware 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 r9, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrewmilson and @shaharsamocha7)

@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Grand_Product_lookups branch from 2980f55 to 35e313d Compare July 15, 2024 13:02
@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from d9935c0 to c137974 Compare July 15, 2024 13:02
Base automatically changed from 05-08-Add_GKR_implementation_of_Grand_Product_lookups to dev July 15, 2024 13:36
Copy link
Contributor Author

@andrewmilson andrewmilson 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: 6 of 10 files reviewed, 1 unresolved discussion (waiting on @shaharsamocha7 and @spapinistarkware)


crates/prover/src/core/backend/cpu/lookups/gkr.rs line 180 at r8 (raw file):

Previously, spapinistarkware (Shahar Papini) wrote…

I wonder if this is needed, or we can use Fraction with a constant numerator, and the compiler will optimizes with constant propagation...

Does not make the optimisation: https://godbolt.org/z/Mvz1YvdfT.
I remove this in a later PR in favour of a more general Reciprocal type (supporting regular and packed field types)

@andrewmilson andrewmilson force-pushed the 05-08-Add_GKR_implementation_of_Logup_lookups branch from c137974 to 3da51dc Compare July 16, 2024 17:07
@andrewmilson andrewmilson merged commit fa79377 into dev Jul 16, 2024
13 of 14 checks passed
@andrewmilson andrewmilson deleted the 05-08-Add_GKR_implementation_of_Logup_lookups branch July 16, 2024 17:13
This was referenced Aug 13, 2024
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.

3 participants