Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-ambrona committed Dec 19, 2024
1 parent 15d926b commit 0de1d59
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions halo2_frontend/src/dev/cost_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,9 @@ pub fn from_circuit_to_model_circuit<

pub fn compute_min_k<F: Ord + Field + FromUniformBytes<64>, C: Circuit<F>>(circuit: &C) -> u32 {
// TODO: We could optimize the order here.
let (_, _, cs) = (5..25)
.find_map(|k| compile_circuit(k, circuit, false).ok())
.expect("A circuit which can be implemented with at most 2^24 rows.");
cs.degree() as u32
(5..25)
.find(|k| compile_circuit(*k, circuit, false).is_ok())
.expect("A circuit which can be implemented with at most 2^24 rows.")
}

/// Given a circuit, this function returns [CostOptions]. If no upper bound for `k` is
Expand Down

0 comments on commit 0de1d59

Please sign in to comment.