diff options
author | Anubhab Bandyopadhyay <4890833+AnubhabB@users.noreply.github.com> | 2024-11-29 03:30:21 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-28 23:00:21 +0100 |
commit | 54e7fc3c97a6d40e459cee4d4bf2eff5c82390da (patch) | |
tree | 8ef4da0e255884de729b8c70fdf642b7c807d631 /candle-core/src/quantized/k_quants.rs | |
parent | 23ed8a9ded155df7b5961d6a5ae12b4e8096a9c2 (diff) | |
download | candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.tar.gz candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.tar.bz2 candle-54e7fc3c97a6d40e459cee4d4bf2eff5c82390da.zip |
Lint fixes introduced with Rust 1.83 (#2646)
* Fixes for lint errors introduced with Rust 1.83
* rustfmt
* Fix more lints.
---------
Co-authored-by: Laurent <laurent.mazare@gmail.com>
Diffstat (limited to 'candle-core/src/quantized/k_quants.rs')
-rw-r--r-- | candle-core/src/quantized/k_quants.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/candle-core/src/quantized/k_quants.rs b/candle-core/src/quantized/k_quants.rs index 6210ac1e..1d3e0538 100644 --- a/candle-core/src/quantized/k_quants.rs +++ b/candle-core/src/quantized/k_quants.rs @@ -1850,8 +1850,8 @@ pub fn matmul<T: GgmlType>( crate::bail!("unexpected lhs length {} {mkn:?}", lhs.len()); } - let k_in_lhs_blocks = (k + T::BLCK_SIZE - 1) / T::BLCK_SIZE; - let k_in_rhs_blocks = (k + T::VecDotType::BLCK_SIZE - 1) / T::VecDotType::BLCK_SIZE; + let k_in_lhs_blocks = k.div_ceil(T::BLCK_SIZE); + let k_in_rhs_blocks = k.div_ceil(T::VecDotType::BLCK_SIZE); // TODO: Do not make this copy if the DotType is f32. // TODO: Pre-allocate this. let mut lhs_b = vec![T::VecDotType::zeros(); m * k_in_lhs_blocks]; |