Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-camuto committed Nov 7, 2024
1 parent b1693dd commit 9c40e5d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ pub struct RunArgs {
#[cfg_attr(all(feature = "ezkl", not(target_arch = "wasm32")), arg(long, default_value = "2", value_hint = clap::ValueHint::Other))]
/// the number of legs used for decompositions
pub decomp_legs: usize,
#[cfg_attr(all(feature = "ezkl", not(target_arch = "wasm32")), arg(long, default_value = "false", value_hint = clap::ValueHint::Other))]
#[cfg_attr(
all(feature = "ezkl", not(target_arch = "wasm32")),
arg(long, default_value = "false")
)]
/// use unbounded lookup for the log
pub bounded_log_lookup: bool,
}
Expand Down
8 changes: 4 additions & 4 deletions src/tensor/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1534,13 +1534,13 @@ pub mod nonlinearities {
/// ```
/// use ezkl::tensor::Tensor;
/// use ezkl::fieldutils::IntegerRep;
/// use ezkl::tensor::ops::nonlinearities::log2;
/// use ezkl::tensor::ops::nonlinearities::ilog2;
/// let x = Tensor::<IntegerRep>::new(
/// Some(&[2, 15, 2, 1, 1, 0]),
/// Some(&[2, 15, 2, 1, 1, 2]),
/// &[2, 3],
/// ).unwrap();
/// let result = log2(&x, 1.0);
/// let expected = Tensor::<IntegerRep>::new(Some(&[1, 3, 1, 0, 0, 0]), &[2, 3]).unwrap();
/// let result = ilog2(&x, 1.0);
/// let expected = Tensor::<IntegerRep>::new(Some(&[1, 4, 1, 0, 0, 1]), &[2, 3]).unwrap();
/// assert_eq!(result, expected);
/// ```
pub fn ilog2(a: &Tensor<IntegerRep>, scale_input: f64) -> Tensor<IntegerRep> {
Expand Down
3 changes: 2 additions & 1 deletion tests/assets/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"check_mode": "UNSAFE",
"commitment": "KZG",
"decomp_base": 128,
"decomp_legs": 2
"decomp_legs": 2,
"bounded_log_lookup": false
},
"num_rows": 46,
"total_assignments": 92,
Expand Down

0 comments on commit 9c40e5d

Please sign in to comment.