From 7dfddd2e7becc932cca5abe283497692a4956bb0 Mon Sep 17 00:00:00 2001 From: Stephen Hwang Date: Thu, 9 Jan 2025 20:02:44 -0500 Subject: [PATCH] chore: remove debugging statements --- benchmarks/src/bin/fib_e2e.rs | 2 +- ci/scripts/bench.py | 1 - crates/prof/src/lib.rs | 1 - crates/sdk/src/prover/halo2.rs | 5 ----- .../native/compiler/src/constraints/halo2/compiler.rs | 4 ---- extensions/native/compiler/src/constraints/halo2/stats.rs | 8 -------- 6 files changed, 1 insertion(+), 20 deletions(-) diff --git a/benchmarks/src/bin/fib_e2e.rs b/benchmarks/src/bin/fib_e2e.rs index d6bdf5982b..169e6ca08b 100644 --- a/benchmarks/src/bin/fib_e2e.rs +++ b/benchmarks/src/bin/fib_e2e.rs @@ -46,7 +46,7 @@ async fn main() -> Result<()> { )?; let app_committed_exe = commit_app_exe(app_pk.app_fri_params(), exe); - let n = 1u64; + let n = 800_000u64; let mut stdin = StdIn::default(); stdin.write(&n); run_with_metric_collection("OUTPUT_PATH", || { diff --git a/ci/scripts/bench.py b/ci/scripts/bench.py index 50e4dc33d6..d9bbc35a1b 100644 --- a/ci/scripts/bench.py +++ b/ci/scripts/bench.py @@ -53,7 +53,6 @@ def run_cargo_command( env["RUSTFLAGS"] = "-Ctarget-cpu=native" # Run the subprocess with the updated environment - print(f"running command: {' '.join(command)}") subprocess.run(command, check=True, env=env) print(f"Output metrics written to {output_path}") diff --git a/crates/prof/src/lib.rs b/crates/prof/src/lib.rs index f1fa4fd6c1..65468fd0de 100644 --- a/crates/prof/src/lib.rs +++ b/crates/prof/src/lib.rs @@ -108,7 +108,6 @@ impl MetricDb { sorted_keys.sort(); for label_keys in sorted_keys { - println!("stephenh: label_keys: {:?}", label_keys); if label_keys.contains(&"cycle_tracker_span".to_string()) { // Skip cycle_tracker_span as it is too long for markdown and visualized in flamegraphs continue; diff --git a/crates/sdk/src/prover/halo2.rs b/crates/sdk/src/prover/halo2.rs index c5d67baa4a..d1f7a4f823 100644 --- a/crates/sdk/src/prover/halo2.rs +++ b/crates/sdk/src/prover/halo2.rs @@ -31,11 +31,6 @@ impl Halo2Prover { let mut witness = Witness::default(); root_proof.write(&mut witness); let snark = info_span!("prove", group = "halo2_outer").in_scope(|| { - if self.halo2_pk.profiling { - println!("stephenh: profiling"); - } else { - println!("stephenh: not profiling"); - } self.halo2_pk .verifier .prove(&self.verifier_srs, witness, self.halo2_pk.profiling) diff --git a/extensions/native/compiler/src/constraints/halo2/compiler.rs b/extensions/native/compiler/src/constraints/halo2/compiler.rs index 87a2994142..aeedc1a812 100644 --- a/extensions/native/compiler/src/constraints/halo2/compiler.rs +++ b/extensions/native/compiler/src/constraints/halo2/compiler.rs @@ -150,9 +150,6 @@ impl Halo2ConstraintCompiler { let mut committed_values_digest = None; #[cfg(feature = "bench-metrics")] let mut old_stats = stats_snapshot(ctx, range.clone()); - #[cfg(feature = "bench-metrics")] - println!("stephenh: ahhh"); - println!("stephenh: start {}", self.profiling); for (instruction, backtrace) in operations { #[cfg(feature = "bench-metrics")] if self.profiling { @@ -440,7 +437,6 @@ impl Halo2ConstraintCompiler { } #[cfg(feature = "bench-metrics")] if self.profiling { - println!("stephenh: halo2 profiling"); let mut new_stats = stats_snapshot(ctx, range.clone()); new_stats.diff(&old_stats); new_stats.increment(cell_tracker.get_full_name()); diff --git a/extensions/native/compiler/src/constraints/halo2/stats.rs b/extensions/native/compiler/src/constraints/halo2/stats.rs index 27629dafaa..0d5192ec82 100644 --- a/extensions/native/compiler/src/constraints/halo2/stats.rs +++ b/extensions/native/compiler/src/constraints/halo2/stats.rs @@ -16,14 +16,10 @@ impl Halo2Stats { #[cfg(feature = "bench-metrics")] mod emit { - use std::sync::atomic::AtomicUsize; - use metrics::counter; use super::Halo2Stats; - static PRINT_COUNT: AtomicUsize = AtomicUsize::new(0); - impl Halo2Stats { pub fn diff(&mut self, another: &Self) { *self = Self { @@ -37,10 +33,6 @@ mod emit { counter!("simple_advice_cells", &labels).increment(self.total_gate_cell as u64); counter!("fixed_cells", &labels).increment(self.total_fixed as u64); counter!("lookup_advice_cells", &labels).increment(self.total_lookup_cell as u64); - if PRINT_COUNT.load(std::sync::atomic::Ordering::Relaxed) < 100 { - tracing::info!("stephenh: total_gate_cell: {}", self.total_gate_cell); - PRINT_COUNT.fetch_add(1, std::sync::atomic::Ordering::Relaxed); - } } } }