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

Parallelize input layer generation #324

Merged

Conversation

Al-Kindi-0
Copy link
Contributor

Leads to about to 20-25% improvement in input layer generation.

prover/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! I left a couple more comments inline.

Comment on lines 167 to 169
batch[(i - row_offset) * num_fractions
..(i - row_offset) * num_fractions + num_fractions]
.copy_from_slice(&wires_from_trace_row);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I'd probably declare a variable for (i - row_offset) * num_fractions to improve readability. Something like:

let n = (i - row_offset) * num_fractions;
batch[n..n + num_fractions].copy_from_slice(&wires_from_trace_row);

prover/src/logup_gkr/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@irakliyk irakliyk left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you! Did the last change affect the runtime at all?

Also, let's create an issue for changing the evaluate_query() interface

@Al-Kindi-0
Copy link
Contributor Author

Al-Kindi-0 commented Sep 20, 2024

Looks good! Thank you! Did the last change affect the runtime at all?

Nothing I could notice

@irakliyk irakliyk merged commit 09ed09b into facebook:logup-gkr Sep 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants