From aca9eed1f1a007ad35bbfa37f1190f621aff4993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= Date: Sat, 15 Jun 2024 09:23:30 -0400 Subject: [PATCH 1/2] refactor: reinstate shard_batch_size Restore the ability to run the entire process in one chunk by setting `SHARD_BATCH_SIZE` to `0`. Fixes #160 --- prover/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/prover/src/lib.rs b/prover/src/lib.rs index 9d92af836..d37110559 100644 --- a/prover/src/lib.rs +++ b/prover/src/lib.rs @@ -423,7 +423,12 @@ impl SphinxProver { ); let mut reduce_proofs = Vec::new(); - let shard_batch_size = opts.recursion_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.recursion_opts.shard_batch_size > 0 { + opts.recursion_opts.shard_batch_size + } else { + usize::MAX + }; for inputs in core_inputs.chunks(shard_batch_size) { let proofs = inputs .into_par_iter() From 4fb6305b68a2d3b086e1c638b478512b07fc5335 Mon Sep 17 00:00:00 2001 From: wwared <541936+wwared@users.noreply.github.com> Date: Mon, 26 Aug 2024 14:24:54 -0300 Subject: [PATCH 2/2] feat: Print summary at end of execution --- core/src/runtime/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/runtime/mod.rs b/core/src/runtime/mod.rs index f29ea98dc..4817a916c 100644 --- a/core/src/runtime/mod.rs +++ b/core/src/runtime/mod.rs @@ -1037,6 +1037,10 @@ impl<'a> Runtime<'a> { self.emit_events = false; self.print_report = true; while !self.execute()? {} + + // Print the summary. + tracing::info!("summary: cycles={}", self.state.global_clk,); + Ok(()) }