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

experiment fanin > 2 in product argument #788

Open
3 tasks
hero78119 opened this issue Dec 26, 2024 · 0 comments
Open
3 tasks

experiment fanin > 2 in product argument #788

hero78119 opened this issue Dec 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hero78119
Copy link
Collaborator

hero78119 commented Dec 26, 2024

Context

Currently in ceno, product argument configure with fanin=2, e.g. read set witness. with respective sumcheck arguments $p[\vec{\gamma}] = \sum_{\vec{b}} eq(\vec{\gamma}, \vec{b}) p_{1}[\vec{b}] * p_{2}[\vec{b}]$. The reason is because to simplify, in sumcheck prover_v2 we only support degree <= 3 implementation so far.

We can extend product argument and experiment > 2 fanins on product and benchmark. To eliminate the limitation of degree sumcheck prover, we can use rust macro to generate the boilerplate code of arbitrary degree implementation.

performance gain

Intuitively

  1. compiler can do more optimisation https://github.com/scroll-tech/ceno/blob/master/sumcheck/src/prover.rs#L469-L473 if goes from f1 * f2 to f1 * f2 * f3 * f4
  2. layer of tower sumcheck product argument can be half, for fanin = 2 -> fanin = 4, number of product argument layers can be divided by 2

Suggested step

@hero78119 hero78119 added the enhancement New feature or request label Dec 26, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 2, 2025
Previously to quick verify idea and avoid massive change, there are new
functionality with suffix `_v2`. After experiment with good result, long
time ago all logic already stick to v2 version and no longer use v1.
This PR clean up all leftover v1 version, do renaming and file
replacement without modify existing logic.

In summary
- `sumcheck/src/prover_v2.rs` ->  `sumcheck/src/prover.rs`
- `multilinear_extensions/src/virtual_poly_v2.rs` ->
`multilinear_extensions/src/virtual_poly.rs`
- clean up all `V2` suffix

This addressed previous out-dated PR
#162, and as a preparation for
#788,
#702
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant