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

Implement GkrOps for SIMD backend #630

Open
wants to merge 1 commit into
base: 05-15-Implement_MleOps_for_SIMD_backend
Choose a base branch
from

Conversation

andrewmilson
Copy link
Contributor

@andrewmilson andrewmilson commented May 16, 2024

This change is Reviewable

@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from e5c33f3 to 075e1e0 Compare June 13, 2024 03:40
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from f7837b1 to 7878fb0 Compare June 13, 2024 03:40
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from 075e1e0 to 8ced162 Compare June 13, 2024 04:09
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 7878fb0 to 13b3e3c Compare June 13, 2024 04:09
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from 8ced162 to a8ba532 Compare June 13, 2024 15:36
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 13b3e3c to ed308eb Compare June 13, 2024 15:36
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from a8ba532 to fa110ae Compare June 13, 2024 15:46
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from ed308eb to 0e58c2e Compare June 13, 2024 15:46
Copy link
Collaborator

@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 3 of 6 files at r1, 3 of 3 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @andrewmilson)

@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from fa110ae to db14e69 Compare June 19, 2024 03:08
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 0e58c2e to 3b03377 Compare June 19, 2024 03:08
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from db14e69 to df114f5 Compare June 19, 2024 03:10
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 3b03377 to 6b36881 Compare June 19, 2024 03:10
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from df114f5 to f103b6e Compare June 20, 2024 15:13
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 6b36881 to 0874a3e Compare June 20, 2024 15:13
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from f103b6e to c4ddfdd Compare June 22, 2024 19:05
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 0874a3e to 5674f67 Compare June 22, 2024 19:05
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from c4ddfdd to 5555a3e Compare June 22, 2024 19:09
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 5674f67 to df87de3 Compare June 22, 2024 19:09
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 2 of 6 files at r1, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @andrewmilson)


crates/prover/src/core/backend/simd/lookups/gkr.rs line 21 at r3 (raw file):

        }

        // Start DP with CPU backend to prevent dealing with instances smaller than a SIMD vector.

what's DP?

Code quote:

Start DP with

crates/prover/src/core/backend/simd/lookups/gkr.rs line 22 at r3 (raw file):

        // Start DP with CPU backend to prevent dealing with instances smaller than a SIMD vector.
        let (y_initial, y_rem) = y.split_last_chunk::<{ LOG_N_LANES as usize }>().unwrap();

y_initial is the last 4 elements in the vector, need another name IMO
or maybe comment that we pass on y in reverse order?

Code quote:

let (y_initial, y_rem) = y.split_last_chunk::<{ LOG_N_LANES as usize }>().unwrap();

crates/prover/src/core/backend/simd/lookups/gkr.rs line 70 at r3 (raw file):

    #[test]
    fn gen_eq_evals_matches_cpu() {

Can you also add a test where y.len() < LOG_N_LANES?

Code quote:

fn gen_eq_evals_matches_cpu() {

@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from 5555a3e to 8ceac89 Compare June 25, 2024 02:11
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from df87de3 to f19de9e Compare June 25, 2024 02:11
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: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @shaharsamocha7 and @spapinistarkware)


crates/prover/src/core/backend/simd/lookups/gkr.rs line 21 at r3 (raw file):

Previously, shaharsamocha7 wrote…

what's DP?

Dynamic Programming


crates/prover/src/core/backend/simd/lookups/gkr.rs line 22 at r3 (raw file):

Previously, shaharsamocha7 wrote…

y_initial is the last 4 elements in the vector, need another name IMO
or maybe comment that we pass on y in reverse order?

Initial in the sense that it's the y values that create the initial values for the algorithm but I see how It's confusing. Changed to y_last_chunk. WDYT?


crates/prover/src/core/backend/simd/lookups/gkr.rs line 70 at r3 (raw file):

Previously, shaharsamocha7 wrote…

Can you also add a test where y.len() < LOG_N_LANES?

Added

@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from 8ceac89 to e175251 Compare June 25, 2024 02:21
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from f19de9e to 7188de2 Compare June 25, 2024 02:21
@andrewmilson andrewmilson force-pushed the 05-15-Implement_MleOps_for_SIMD_backend branch from e175251 to c51f096 Compare June 26, 2024 14:33
@andrewmilson andrewmilson force-pushed the 05-15-Implement_GkrOps_for_SIMD_backend branch from 7188de2 to 4968f10 Compare June 26, 2024 14:33
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.

None yet

4 participants