mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-03 14:23:07 +00:00
Minor
This commit is contained in:
parent
58425eb548
commit
45da024aef
@ -97,12 +97,7 @@ impl<F: Field, const W: usize, const R: usize> DeterministicGate<F> for GMiMCGat
|
||||
.map(|(i, out)| (GateOutputLocation::NextWire(Self::wire_output(i)), out))
|
||||
.collect();
|
||||
|
||||
// A degree of 9 is reasonable for most circuits, and it means that we only need wires for
|
||||
// every other addition buffer state.
|
||||
println!("before");
|
||||
let out = OutputGraph { outputs }.shrink_degree(9);
|
||||
println!("after");
|
||||
out
|
||||
OutputGraph { outputs }
|
||||
}
|
||||
|
||||
fn additional_constraints(&self, _config: CircuitConfig) -> Vec<ConstraintPolynomial<F>> {
|
||||
|
||||
11
src/main.rs
11
src/main.rs
@ -31,7 +31,7 @@ mod wire;
|
||||
mod witness;
|
||||
|
||||
// 12 wire polys, 3 Z polys, 4 parts of quotient poly.
|
||||
const PROVER_POLYS: usize = 101 + 3 + 4; // TODO: Check
|
||||
const PROVER_POLYS: usize = 64 + 3 + (9 + 1); // TODO: Check
|
||||
|
||||
fn main() {
|
||||
let overall_start = Instant::now();
|
||||
@ -55,16 +55,17 @@ fn bench_gmimc<F: Field>() {
|
||||
constants[i] = F::from_canonical_u64(GMIMC_CONSTANTS[i]);
|
||||
}
|
||||
|
||||
let threads = 12;
|
||||
let hashes_per_poly = 1 << (13 + 3);
|
||||
let threads = (0..threads).map(|_i| {
|
||||
const THREADS: usize = 12;
|
||||
const LDE_BITS: i32 = 4;
|
||||
let hashes_per_poly = 1 << (13 + LDE_BITS);
|
||||
let threads = (0..THREADS).map(|_i| {
|
||||
thread::spawn(move || {
|
||||
let mut x = [F::ZERO; 12];
|
||||
for i in 0..12 {
|
||||
x[i] = F::from_canonical_u64((i as u64) * 123456 + 789);
|
||||
}
|
||||
|
||||
let hashes_per_thread = hashes_per_poly * PROVER_POLYS / threads;
|
||||
let hashes_per_thread = hashes_per_poly * PROVER_POLYS / THREADS;
|
||||
let start = Instant::now();
|
||||
for _ in 0..hashes_per_thread {
|
||||
x = gmimc::gmimc_permute_array::<_, 12, GMIMC_ROUNDS>(x, GMIMC_CONSTANTS);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user