diff --git a/candle-core/src/cuda_backend/mod.rs b/candle-core/src/cuda_backend/mod.rs index 37fef5078e..2cd97c182e 100644 --- a/candle-core/src/cuda_backend/mod.rs +++ b/candle-core/src/cuda_backend/mod.rs @@ -255,7 +255,7 @@ impl Map1 for Powf { } struct FastReduce<'a>(&'a [usize], ReduceOp); -impl<'a> Map1Any for FastReduce<'a> { +impl Map1Any for FastReduce<'_> { fn f) -> S>( &self, src: &CudaSlice, @@ -350,7 +350,7 @@ impl Map1 for U { } struct IndexSelect<'a>(&'a CudaStorage, &'a Layout, usize); -impl<'a> Map1 for IndexSelect<'a> { +impl Map1 for IndexSelect<'_> { fn f( &self, src: &CudaSlice, @@ -410,7 +410,7 @@ impl<'a> Map1 for IndexSelect<'a> { } struct Gather<'a>(&'a CudaStorage, &'a Layout, usize); -impl<'a> Map1 for Gather<'a> { +impl Map1 for Gather<'_> { fn f( &self, src: &CudaSlice, @@ -461,7 +461,7 @@ impl<'a> Map1 for Gather<'a> { } struct IndexAdd<'a>(&'a CudaStorage, &'a Layout, usize); -impl<'a> Map2InPlace for IndexAdd<'a> { +impl Map2InPlace for IndexAdd<'_> { fn f( &self, dst: &mut CudaSlice, @@ -509,7 +509,7 @@ impl<'a> Map2InPlace for IndexAdd<'a> { } struct ScatterAdd<'a>(&'a CudaStorage, &'a Layout, usize); -impl<'a> Map2InPlace for ScatterAdd<'a> { +impl Map2InPlace for ScatterAdd<'_> { fn f( &self, dst: &mut CudaSlice, @@ -554,7 +554,7 @@ impl<'a> Map2InPlace for ScatterAdd<'a> { } struct Conv1D<'a>(&'a crate::conv::ParamsConv1D); -impl<'a> Map2 for Conv1D<'a> { +impl Map2 for Conv1D<'_> { fn f( &self, inp: &CudaSlice, @@ -595,7 +595,7 @@ impl<'a> Map2 for Conv1D<'a> { } struct Conv2D<'a>(&'a crate::conv::ParamsConv2D); -impl<'a> Map2 for Conv2D<'a> { +impl Map2 for Conv2D<'_> { fn f( &self, inp: &CudaSlice, @@ -660,7 +660,7 @@ impl Map1 for Col2Im1D { } struct ConvTranspose1D<'a>(&'a crate::conv::ParamsConvTranspose1D); -impl<'a> Map2 for ConvTranspose1D<'a> { +impl Map2 for ConvTranspose1D<'_> { fn f( &self, inp: &CudaSlice, @@ -709,7 +709,7 @@ impl<'a> Map2 for ConvTranspose1D<'a> { } struct ConvTranspose2D<'a>(&'a crate::conv::ParamsConvTranspose2D); -impl<'a> Map2 for ConvTranspose2D<'a> { +impl Map2 for ConvTranspose2D<'_> { fn f( &self, inp: &CudaSlice, @@ -850,7 +850,7 @@ impl Map1 for UpsampleNearest2D { } struct WhereCond<'a>(&'a CudaStorage, &'a Layout); -impl<'a> Map2 for WhereCond<'a> { +impl Map2 for WhereCond<'_> { fn f( &self, t: &CudaSlice, diff --git a/candle-core/src/quantized/cuda.rs b/candle-core/src/quantized/cuda.rs index 3c24c0e546..1a3d72c0fd 100644 --- a/candle-core/src/quantized/cuda.rs +++ b/candle-core/src/quantized/cuda.rs @@ -36,7 +36,7 @@ pub const CUDA_DEQUANTIZE_BLOCK_SIZE: usize = 256; pub const MATRIX_ROW_PADDING: usize = 512; fn ceil_div(p: usize, q: usize) -> usize { - (p + q - 1) / q + p.div_ceil(q) } fn pad(p: usize, q: usize) -> usize {