Skip to content

Commit

Permalink
fix Grand Product benches
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-a16z committed Nov 15, 2024
1 parent 6af2117 commit 87ba34d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions jolt-core/benches/grand_product.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ use jolt_core::subprotocols::grand_product::{
BatchedDenseGrandProduct, BatchedGrandProduct, BatchedGrandProductProof,
};
use jolt_core::subprotocols::grand_product_quarks::{
QuarkGrandProduct, QuarkGrandProductConfig, QuarkHybridLayerDepth,
QuarkGrandProduct, QuarkGrandProductConfig
};
use jolt_core::utils::transcript::{KeccakTranscript, Transcript};
use rand_chacha::ChaCha20Rng;
use rand_core::{RngCore, SeedableRng};
use jolt_core::subprotocols::QuarkHybridLayerDepth;

Check warning on line 16 in jolt-core/benches/grand_product.rs

View workflow job for this annotation

GitHub Actions / fmt

Diff in /home/runner/work/jolt/jolt/jolt-core/benches/grand_product.rs

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

#[derive(Clone, Copy)]
struct BenchConfig {
Expand Down Expand Up @@ -153,7 +154,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 +187,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

0 comments on commit 87ba34d

Please sign in to comment.