Skip to content

Commit ee82dce

Browse files
committed
chore: use flexible cpus when creating shapes
1 parent 980997f commit ee82dce

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/prover/scripts/find_maximal_shapes.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,12 @@ fn main() {
6868
);
6969
}
7070

71+
use std::thread::available_parallelism;
7172
// For each program, collect the maximal shapes.
72-
let (tx, rx) = mpsc::sync_channel(10);
73+
let channel_size =
74+
available_parallelism().unwrap_or(std::num::NonZeroUsize::new(11).unwrap()).get();
75+
tracing::info!("using channel size: {}", channel_size);
76+
let (tx, rx) = mpsc::sync_channel(channel_size - 1);
7377

7478
if args.reth || args.geth {
7579
let start_block = args.start_block.expect("start block must be provided for reth/geth");
@@ -127,6 +131,7 @@ fn main() {
127131
} else {
128132
let program_list = args.list;
129133
for path in program_list {
134+
tracing::info!("running for program at path: {}", path);
130135
// Read the program and stdin.
131136
let elf = std::fs::read(path.clone() + "/program.bin").expect("failed to read program");
132137
let stdin = std::fs::read(path.clone() + "/stdin.bin").expect("failed to read stdin");

0 commit comments

Comments
 (0)