Skip to content

Conversation

@hero78119
Copy link
Collaborator

@hero78119 hero78119 commented Nov 29, 2024

An experiment to see how much gain we have on e2e latency

Also related to #568

@hero78119 hero78119 marked this pull request as draft November 29, 2024 06:32
@hero78119
Copy link
Collaborator Author

hero78119 commented Dec 5, 2024

Hi @chaosma @yczhangsjtu FYI, please refer changes on file "mpcs/src/basefold/commit_phase.rs", other are just noise and can be ignored.

For benchmarn, before/after this change, e2e remain the same 😂
Few reason

  • I didn't apply complex threading model as prover_v2 in ceno main prove part sumcheck, so in rayon, different thread might take different part of vector, so the cache hit rate is not good
  • basefold openining overhead is small comparing with other part

But the good thing is we can share sumcheck implementation between main proof/mpcs, so we can reduce technical burden and avoid duplicate implementation

Hope this PR can help on WHIR implementation, if you need any input or review on WHIR, I will be happy to learn that and review your implementation

@hero78119 hero78119 mentioned this pull request Apr 1, 2025
3 tasks
@hero78119
Copy link
Collaborator Author

Closed in favour of #891

@hero78119 hero78119 closed this Apr 1, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 3, 2025
Follow up on #843
Clean up basefold sumcheck and unified devirgo sumcheck with ceno. 
Previously in #653 before/after
change is insignificant, but after bunch of refactor and optimised other
critical path, now the benchmark shows promising result.

### Change highlights
- [x] switch to ceno sumcheck and break down basefold sumcheck into 2
phases
> we can't directly use ceno sumcheck as blackbox because of FRI part in
basefold.
- [x] and use evaluation form as uni-variates
- [x] clean up old sumcheck impl

### benchmark 
With e2e
Fibonacci 2^20

```
fibonacci_max_steps_1048576/prove_fibonacci/fibonacci_max_steps_1048576
                        time:   [3.1789 s 3.2022 s 3.2274 s]
                        change: [-14.457% -13.632% -12.780%] (p = 0.00 < 0.05)
                        Performance has improved.
```

Fibonacci 2^21
```
fibonacci_max_steps_2097152/prove_fibonacci/fibonacci_max_steps_2097152
                        time:   [5.2820 s 5.3010 s 5.3207 s]
                        change: [-16.128% -15.753% -15.306%] (p = 0.00 < 0.05)
                        Performance has improved.
```

Fibonacci 2^22
```
fibonacci_max_steps_4194304/prove_fibonacci/fibonacci_max_steps_4194304
                        time:   [10.369 s 10.397 s 10.423 s]
                        change: [-10.485% -10.041% -9.5790%] (p = 0.00 < 0.05)
                        Performance has improved.
```
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.

1 participant