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

Parallelization optimizations #105

Merged
merged 8 commits into from
Dec 19, 2022
Merged

Parallelization optimizations #105

merged 8 commits into from
Dec 19, 2022

Conversation

chancharles92
Copy link
Collaborator

@chancharles92 chancharles92 commented Dec 16, 2022

List of optimizations on prover:

  1. replace Rc with Arc. (cherrypick from @bbuenz 's branch main...arcpariter)
  2. Apply Rayon parallelization tricks.
  3. Improve the efficiency of constructing partial product polynomial V(0, X) by using batch inversion.

Copy link
Contributor

@bbuenz bbuenz left a comment

Choose a reason for hiding this comment

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

Are all these under the parallel feature flag?

@chancharles92
Copy link
Collaborator Author

chancharles92 commented Dec 17, 2022

Are all these under the parallel feature flag?

Not yet. We can add parallel feature flag everywhere. The only drawback is that the code will be a little redundant. I can add a commit if we decide to make them under parallel flags.

Btw, currently, we achieve 1-thread performance by command RAYON_NUM_THREADS=1 cargo bench --no-default-features --features=bench.

res[i] = data[i << 1] + (data[(i << 1) + 1] - data[i << 1]) * point;
}
}
res.par_iter_mut().enumerate().for_each(|(i, x)| {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we continue to make parallel dependent on nv?

@bbuenz bbuenz merged commit 77bc9f5 into main Dec 19, 2022
@bbuenz bbuenz deleted the arcpariter-new branch December 19, 2022 18:55
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.

2 participants