Skip to content

Commit 6be5215

Browse files
author
Hanting Zhang
committed
checkpoint
1 parent 13fe808 commit 6be5215

File tree

10 files changed

+10534
-8
lines changed

10 files changed

+10534
-8
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ tempfile = "3.6.0"
141141
camino = "1.1.6"
142142
thiserror = "1.0.44"
143143
tracing = "0.1.37"
144-
tracing-texray = "0.2.0"
144+
tracing-texray = { git = "https://github.com/winston-h-zhang/tracing-texray", branch = "shim" }
145145
tracing-subscriber = "0.3.17"
146146

147147
[[bin]]

benches/dev/600.txt

+1,691
Large diffs are not rendered by default.

benches/dev/900.txt

+3,132
Large diffs are not rendered by default.

benches/fibonacci.rs

+15-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ use lurk::{
2121
state::State,
2222
};
2323

24+
use tracing_subscriber::{fmt, prelude::*, EnvFilter, Registry};
25+
use tracing_texray::TeXRayLayer;
26+
2427
mod common;
2528
use common::set_bench_config;
2629

@@ -148,7 +151,8 @@ fn fibonacci_prove<M: measurement::Measurement>(
148151
b.iter_batched(
149152
|| frames,
150153
|frames| {
151-
let result = prover.prove(&pp, frames, &store);
154+
let result = tracing_texray::examine(tracing::info_span!("bang!"))
155+
.in_scope(|| prover.prove(&pp, frames, &store));
152156
let _ = black_box(result);
153157
},
154158
BatchSize::LargeInput,
@@ -157,14 +161,20 @@ fn fibonacci_prove<M: measurement::Measurement>(
157161
);
158162
}
159163

164+
160165
fn fibonacci_benchmark(c: &mut Criterion) {
161166
// Uncomment to record the logs. May negatively impact performance
162-
//tracing_subscriber::fmt::init();
167+
let subscriber = Registry::default()
168+
.with(fmt::layer().pretty())
169+
.with(EnvFilter::from_default_env())
170+
.with(TeXRayLayer::new().width(120));
171+
tracing::subscriber::set_global_default(subscriber).unwrap();
172+
163173
set_bench_config();
164174
tracing::debug!("{:?}", lurk::config::LURK_CONFIG);
165175

166176
let reduction_counts = rc_env().unwrap_or_else(|_| vec![100]);
167-
let batch_sizes = [100, 200];
177+
let batch_sizes = [249, 374, 499];
168178

169179
let state = State::init_lurk_state().rccell();
170180

@@ -187,6 +197,8 @@ fn fibonacci_benchmark(c: &mut Criterion) {
187197
}
188198
}
189199

200+
// RUST_LOG=info LURK_RC=600 LURK_PERF=max-parallel-simple cargo criterion --bench fibonacci --features "cuda" 2> ./benches/gpu-spmvm/600.txt
201+
// RUST_LOG=info LURK_RC=900 LURK_PERF=max-parallel-simple cargo criterion --bench fibonacci --features "cuda" 2> ./benches/dev/900.txt
190202
cfg_if::cfg_if! {
191203
if #[cfg(feature = "flamegraph")] {
192204
criterion_group! {

benches/gpu-spmvm/1200.txt

+2,540
Large diffs are not rendered by default.

benches/gpu-spmvm/600.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Compiling sppark v0.1.5
2+
Compiling pasta-msm v0.1.4 (https://github.com/lurk-lab/pasta-msm?branch=dev#182b971d)

benches/gpu-spmvm/900.txt

+3,149
Large diffs are not rendered by default.

src/lem/eval.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ fn build_frames<
9696
let mut pc = 0;
9797
let mut frames = vec![];
9898
let mut iterations = 0;
99-
tracing::info!("{}", &log_fmt(0, &input, &[], store));
99+
tracing::debug!("{}", &log_fmt(0, &input, &[], store));
100100
for _ in 0..limit {
101101
let mut emitted = vec![];
102102
let (frame, must_break) =
103103
compute_frame(lurk_step, cprocs_run, &input, store, lang, &mut emitted, pc)?;
104104

105105
iterations += 1;
106106
input = frame.output.clone();
107-
tracing::info!("{}", &log_fmt(iterations, &input, &emitted, store));
107+
tracing::debug!("{}", &log_fmt(iterations, &input, &emitted, store));
108108
let expr = frame.output[0];
109109
frames.push(frame);
110110

src/lem/multiframe.rs

+1
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@ impl<'a, F: LurkField, C: Coprocessor<F>> nova::traits::circuit::StepCircuit<F>
826826
2 * self.lurk_step.input_params.len()
827827
}
828828

829+
#[tracing::instrument(skip_all, name = "synthesize")]
829830
fn synthesize<CS>(
830831
&self,
831832
cs: &mut CS,

src/lem/var_map.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::collections::hash_map::Entry;
22

33
use anyhow::{bail, Result};
44
use fxhash::FxHashMap;
5-
use tracing::info;
65

76
use super::Var;
87

@@ -29,7 +28,7 @@ impl<V> VarMap<V> {
2928
}
3029
Entry::Occupied(mut o) => {
3130
let v = o.insert(v);
32-
info!("Variable {} has been overwritten", o.key());
31+
tracing::debug!("Variable {} has been overwritten", o.key());
3332
Some(v)
3433
}
3534
}

0 commit comments

Comments
 (0)