Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-a16z committed Jan 6, 2025
1 parent 146b4b8 commit 74648bd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
13 changes: 3 additions & 10 deletions jolt-core/benches/msm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,7 @@ where
MsmType::Large(_) => (0..SRS_SIZE)
.into_iter()
.map(|_| {
let values: [u64; 4] = [
rng.next_u64(),
rng.next_u64(),
rng.next_u64(),
rng.next_u64(),
];
let bigint = ark_ff::BigInteger256::new(values);
<Fr as JoltField>::from_bytes(&bigint.to_bytes_le())
Fr::random(&mut rng)
})
.collect(),
};
Expand All @@ -78,6 +71,8 @@ where
.map(|base| G1Projective::from_ark_affine(base))
.collect(),
);
#[cfg(not(feature = "icicle"))]
let gpu_bases = None;

let max_num_bits = scalars
.par_iter()
Expand All @@ -86,8 +81,6 @@ where
.unwrap();

println!("Using max num bits: {}", max_num_bits);
#[cfg(not(feature = "icicle"))]
let gpu_bases = None;
(bases, gpu_bases, scalars)
}

Expand Down
9 changes: 1 addition & 8 deletions jolt-core/benches/msm_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,7 @@ fn get_scalars(msm_type: MsmType, size: usize) -> Vec<Fr> {
MsmType::Large(_) => (0..size)
.into_iter()
.map(|_| {
let values: [u64; 4] = [
rng.next_u64(),
rng.next_u64(),
rng.next_u64(),
rng.next_u64(),
];
let bigint = ark_ff::BigInteger256::new(values);
<Fr as JoltField>::from_bytes(&bigint.to_bytes_le())
Fr::random(&mut rng)
})
.collect(),
}
Expand Down
3 changes: 1 addition & 2 deletions jolt-core/src/jolt/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,6 @@ where
max_memory_address: usize,
max_trace_length: usize,
) -> JoltPreprocessing<C, F, PCS, ProofTranscript> {
//TODO(sagar): This should be moved to a more appropriate place - icicle makes a network request
// which impacts prover time.
icicle::icicle_init();

let bytecode_commitment_shapes = BytecodeProof::<F, PCS, ProofTranscript>::commit_shapes(
Expand Down Expand Up @@ -406,6 +404,7 @@ where
JoltCommitments<PCS, ProofTranscript>,
Option<ProverDebugInfo<F, ProofTranscript>>,
) {
icicle::icicle_init();
let trace_length = trace.len();
let padded_trace_length = trace_length.next_power_of_two();
println!("Trace length: {}", trace_length);
Expand Down

0 comments on commit 74648bd

Please sign in to comment.