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

Actually use precomputed witness #932

Merged
merged 3 commits into from
Dec 2, 2023
Merged

Conversation

arthurpaulino
Copy link
Member

@arthurpaulino arthurpaulino commented Nov 30, 2023

This PR is a second attempt after the failure of #928 (reverted in #931).

#928 was returning the wrong output because LEM doesn't allocate the output at the end.

So this PR allows MultiFrameTrait implementers to cache their witnesses internally, using whichever data format they want. LEM's MultiFrame does so by caching the WitnessCS and the output (the vector of allocated numbers).

With that available, LEM can now make proper use of cached witnesses.

@arthurpaulino arthurpaulino requested review from a team as code owners November 30, 2023 00:43
@arthurpaulino
Copy link
Member Author

!gpu-benchmark

Copy link
Contributor

Benchmark for 08da70d

Click to view benchmark
Test Base PR %
LEM Fibonacci Prove - rc = 100/fib/num-100 4.0±0.01s 3.9±0.02s -2.50%
LEM Fibonacci Prove - rc = 100/fib/num-200 8.1±0.02s 7.8±0.02s -3.70%
LEM Fibonacci Prove - rc = 600/fib/num-100 3.4±0.01s 3.3±0.01s -2.94%
LEM Fibonacci Prove - rc = 600/fib/num-200 7.6±0.04s 7.4±0.11s -2.63%

@arthurpaulino
Copy link
Member Author

!gpu-benchmark

Copy link
Contributor

Benchmark for 08da70d

Click to view benchmark
Test Base PR %
LEM Fibonacci Prove - rc = 100/fib/num-100 5.0±0.02s 4.8±0.04s -4.00%
LEM Fibonacci Prove - rc = 100/fib/num-200 10.2±0.04s 9.9±0.03s +-2.94%
LEM Fibonacci Prove - rc = 600/fib/num-100 4.9±0.02s 4.8±0.03s -2.04%
LEM Fibonacci Prove - rc = 600/fib/num-200 10.7±0.03s 10.7±0.23s 0.00%

src/lem/multiframe.rs Outdated Show resolved Hide resolved
@arthurpaulino
Copy link
Member Author

!gpu-benchmark

Copy link
Contributor

github-actions bot commented Dec 1, 2023

Benchmark for 86b5844

Click to view benchmark
Test Base PR %
LEM Fibonacci Prove - rc = 100/fib/num-100 5.0±0.03s 4.7±0.03s -6.00%
LEM Fibonacci Prove - rc = 100/fib/num-200 10.1±0.04s 9.7±0.03s +-3.96%
LEM Fibonacci Prove - rc = 600/fib/num-100 4.8±0.02s 4.7±0.03s -2.08%
LEM Fibonacci Prove - rc = 600/fib/num-200 10.5±0.03s 10.2±0.05s -2.86%

@arthurpaulino arthurpaulino added this pull request to the merge queue Dec 1, 2023
github-actions bot pushed a commit that referenced this pull request Dec 1, 2023
Merged via the queue into main with commit 212f295 Dec 2, 2023
12 checks passed
@arthurpaulino arthurpaulino deleted the use-cached-witness-2 branch December 2, 2023 00:00
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