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

[Release v0.4.0] FFT memory reduction and proving key size reduction #17

Merged
merged 8 commits into from
Nov 18, 2023
Merged
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
with:
override: false
- name: Run examples
run: cargo run --example serialization
run: |
cargo run --example serialization
cargo run --example shuffle
cargo run --example shuffle_api

fmt:
name: Rustfmt
Expand Down
9 changes: 4 additions & 5 deletions halo2_proofs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "halo2-axiom"
version = "0.3.1"
version = "0.4.0"
authors = [
"Sean Bowe <sean@electriccoin.co>",
"Ying Tong Lai <yingtong@electriccoin.co>",
Expand Down Expand Up @@ -55,12 +55,13 @@ name = "fft"
harness = false

[dependencies]
itertools = "0.11"
backtrace = { version = "0.3", optional = true }
crossbeam = "0.8"
ff = "0.13"
group = "0.13"
pairing = "0.23"
halo2curves = { package = "halo2curves-axiom", version = "0.4.1", default-features = false, features = ["bits", "bn256-table", "derive_serde"] }
halo2curves = { package = "halo2curves-axiom", version = "0.4.2", default-features = false, features = ["bits", "bn256-table", "derive_serde"] }
rand = "0.8"
rand_core = { version = "0.6", default-features = false}
tracing = "0.1"
Expand All @@ -84,6 +85,7 @@ gumdrop = "0.8"
proptest = "1"
rand_core = { version = "0.6", features = ["getrandom"] }
rand_chacha = "0.3.1"
ark-std = { version = "0.3.0", features = ["print-trace"] }

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
getrandom = { version = "0.2", features = ["js"] }
Expand Down Expand Up @@ -114,6 +116,3 @@ name = "serialization"

[[example]]
name = "shuffle"

[[example]]
name = "shuffle_api"
18 changes: 13 additions & 5 deletions halo2_proofs/benches/fft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@ extern crate criterion;

use crate::arithmetic::best_fft;
use group::ff::Field;
use halo2_axiom::*;
use halo2curves::pasta::Fp;
use halo2_axiom::{poly::EvaluationDomain, *};
use halo2curves::bn256::Fr as Scalar;

use criterion::{BenchmarkId, Criterion};
use rand_core::OsRng;

fn criterion_benchmark(c: &mut Criterion) {
let j = 5;
let mut group = c.benchmark_group("fft");
for k in 3..19 {
let domain = EvaluationDomain::new(j, k);
let omega = domain.get_omega();
let l = 1 << k;
let data = domain.get_fft_data(l);

group.bench_function(BenchmarkId::new("k", k), |b| {
let mut a = (0..(1 << k)).map(|_| Fp::random(OsRng)).collect::<Vec<_>>();
let omega = Fp::random(OsRng); // would be weird if this mattered
let mut a = (0..(1 << k))
.map(|_| Scalar::random(OsRng))
.collect::<Vec<_>>();

b.iter(|| {
best_fft(&mut a, omega, k as u32);
best_fft(&mut a, omega, k, data, false);
});
});
}
Expand Down
208 changes: 0 additions & 208 deletions halo2_proofs/examples/shuffle_api.rs

This file was deleted.

Loading
Loading