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

fix Grand Product benches #502

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions jolt-core/benches/grand_product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ use jolt_core::poly::opening_proof::{ProverOpeningAccumulator, VerifierOpeningAc
use jolt_core::subprotocols::grand_product::{
BatchedDenseGrandProduct, BatchedGrandProduct, BatchedGrandProductProof,
};
use jolt_core::subprotocols::grand_product_quarks::{
QuarkGrandProduct, QuarkGrandProductConfig, QuarkHybridLayerDepth,
};
use jolt_core::subprotocols::grand_product_quarks::{QuarkGrandProduct, QuarkGrandProductConfig};
use jolt_core::subprotocols::QuarkHybridLayerDepth;
use jolt_core::utils::transcript::{KeccakTranscript, Transcript};
use rand_chacha::ChaCha20Rng;
use rand_core::{RngCore, SeedableRng};

const SRS_SIZE: usize = 1 << 10;
const SRS_SIZE: usize = 1 << 16;

#[derive(Clone, Copy)]
struct BenchConfig {
Expand Down Expand Up @@ -153,7 +152,7 @@ fn benchmark_verify<PCS, F, G, ProofTranscript>(
transcript = ProofTranscript::new(b"test_transcript");
let mut verifier_accumulator: VerifierOpeningAccumulator<F, PCS, ProofTranscript> =
VerifierOpeningAccumulator::new();
let (_, r_verifier) = QuarkGrandProduct::verify_quark_grand_product(
let (_, r_verifier) = QuarkGrandProduct::verify_grand_product(
&proof,
&known_products,
Some(&mut verifier_accumulator),
Expand Down Expand Up @@ -186,7 +185,7 @@ fn main() {
.configure_from_args()
.warm_up_time(std::time::Duration::from_secs(5));
let num_layers = 50;
let layer_size = 1 << 10;
let layer_size = 1 << 8;
let mut config = BenchConfig {
name: "",
num_layers,
Expand Down
2 changes: 1 addition & 1 deletion jolt-core/src/poly/dense_interleaved_poly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl<F: JoltField, ProofTranscript: Transcript> BatchedCubicSumcheck<F, ProofTra
})
.collect();

let chunk_size = self.len.next_power_of_two() / eq_poly.E2_len;
let chunk_size = (self.len.next_power_of_two() / eq_poly.E2_len).max(1);
eq_poly.E2[..eq_poly.E2_len]
.par_iter()
.zip(self.par_chunks(chunk_size))
Expand Down
Loading