Skip to content

Commit

Permalink
refactor: reinstate shard_batch_size
Browse files Browse the repository at this point in the history
- Restore the ability to run the entire process in one chunk by setting `SHARD_BATCH_SIZE` to `0`.
  • Loading branch information
huitseeker committed Jun 15, 2024
1 parent c99349a commit bf0a610
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,12 @@ impl SphinxProver {

let mut first_layer_proofs = Vec::new();
let opts = SphinxCoreOpts::recursion();
let shard_batch_size = opts.shard_batch_size;
// We want the ability to set SHARD_BATCH_SIZE to 0 to run everything in one chunk
let shard_batch_size = if opts.shard_batch_size > 0 {
opts.shard_batch_size
} else {
usize::MAX
};
for inputs in core_inputs.chunks(shard_batch_size) {
let proofs = inputs
.into_par_iter()
Expand Down

0 comments on commit bf0a610

Please sign in to comment.