Skip to content

Commit

Permalink
HyperKZG+Shplonk primary PCS (#348)
Browse files Browse the repository at this point in the history
* feat: Merge Hyperkzg and Shplonk

* bench: Include HyperKzg+Shplonk PCS to the benchmark

Folks suggest using 'measurement_time' equals to 100s in order to
make measurements more resilient to transitory peak loads caused by
external programs.

bheisler/criterion.rs#322

* chore: Move HyperKZG+Shponk code to hyperkzg.rs source file

* chore: Requested refactoring

* chore: Implement SubAssign trait for UniPoly
  • Loading branch information
storojs72 authored Feb 29, 2024
1 parent 02d9fe5 commit ba34148
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 1,041 deletions.
10 changes: 4 additions & 6 deletions benches/pcs.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use arecibo::provider::Bn256EngineIPA;
use arecibo::provider::{
hyperkzg::EvaluationEngine as MLEvaluationEngine,
ipa_pc::EvaluationEngine as IPAEvaluationEngine, non_hiding_zeromorph::ZMPCS,
shplonk::EvaluationEngine as Shplonk, Bn256EngineKZG, Bn256EngineZM,
};
use arecibo::provider::{Bn256EngineIPA, Bn256EngineKZG, Bn256EngineZM};
use arecibo::spartan::polys::multilinear::MultilinearPolynomial;
use arecibo::traits::{
commitment::CommitmentEngineTrait, evaluation::EvaluationEngineTrait, Engine,
Expand All @@ -26,13 +25,13 @@ cfg_if::cfg_if! {
if #[cfg(feature = "flamegraph")] {
criterion_group! {
name = pcs;
config = Criterion::default().warm_up_time(Duration::from_millis(3000)).with_profiler(pprof::criterion::PProfProfiler::new(100, pprof::criterion::Output::Flamegraph(None)));
config = Criterion::default().warm_up_time(Duration::from_millis(3000)).with_profiler(pprof::criterion::PProfProfiler::new(100, pprof::criterion::Output::Flamegraph(None))).measurement_time(Duration::from_secs(100));
targets = bench_pcs
}
} else {
criterion_group! {
name = pcs;
config = Criterion::default().warm_up_time(Duration::from_millis(3000));
config = Criterion::default().warm_up_time(Duration::from_millis(3000)).measurement_time(Duration::from_secs(100));
targets = bench_pcs
}
}
Expand Down Expand Up @@ -160,8 +159,7 @@ fn bench_pcs(c: &mut Criterion) {
bench_pcs_verifying_internal,
(ipa_assets, IPAEvaluationEngine<Bn256EngineIPA>),
(hyperkzg_assets, MLEvaluationEngine<Bn256, Bn256EngineKZG>),
(zm_assets, ZMPCS<Bn256, Bn256EngineZM>),
(shplonk_assets, Shplonk<Bn256, Bn256EngineKZG>)
(zm_assets, ZMPCS<Bn256, Bn256EngineZM>)
);
}

Expand Down
Loading

1 comment on commit ba34148

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

Benchmarks

Table of Contents

Overview

This benchmark report shows the Arecibo GPU benchmarks.
NVIDIA L4
Intel(R) Xeon(R) CPU @ 2.20GHz
32 vCPUs
125 GB RAM
Workflow run: https://github.com/lurk-lab/arecibo/actions/runs/8098617780

Benchmark Results

RecursiveSNARK-NIVC-2

ref=02d9fe5 ref=ba34148
Prove-NumCons-6540 44.69 ms (✅ 1.00x) 44.52 ms (✅ 1.00x faster)
Verify-NumCons-6540 34.39 ms (✅ 1.00x) 34.63 ms (✅ 1.01x slower)
Prove-NumCons-1028888 328.63 ms (✅ 1.00x) 330.39 ms (✅ 1.01x slower)
Verify-NumCons-1028888 251.57 ms (✅ 1.00x) 253.48 ms (✅ 1.01x slower)

CompressedSNARK-NIVC-Commitments-2

ref=02d9fe5 ref=ba34148
Prove-NumCons-6540 10.64 s (✅ 1.00x) 10.67 s (✅ 1.00x slower)
Verify-NumCons-6540 51.28 ms (✅ 1.00x) 50.63 ms (✅ 1.01x faster)
Prove-NumCons-1028888 53.87 s (✅ 1.00x) 53.52 s (✅ 1.01x faster)
Verify-NumCons-1028888 50.80 ms (✅ 1.00x) 50.26 ms (✅ 1.01x faster)

Made with criterion-table

Please sign in to comment.