Skip to content

Commit

Permalink
Fix Clippy + CI (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard authored Nov 28, 2024
1 parent 0f83126 commit eec39ba
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/cubecl-core/src/codegen/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ where
}
}

impl<'h, 'a, 'b, 'c, K, R, E1, E2, E3> Execution<'h, K, R, (&'a [E1], &'b [E2], &'c [E3])>
impl<K, R, E1, E2, E3> Execution<'_, K, R, (&[E1], &[E2], &[E3])>
where
K: Kernel + 'static,
R: Runtime,
Expand Down
1 change: 0 additions & 1 deletion crates/cubecl-core/src/compute/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use cubecl_runtime::ExecutionMode;
/// A kernel, compiled in the target language
pub struct CompiledKernel<C: Compiler> {
/// The name of the kernel entrypoint.

/// For example
///
/// ```text
Expand Down
2 changes: 1 addition & 1 deletion crates/cubecl-core/src/frontend/container/array/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ pub enum ArrayArg<'a, R: Runtime> {
},
}

impl<'a, R: Runtime> ArgSettings<R> for ArrayArg<'a, R> {
impl<R: Runtime> ArgSettings<R> for ArrayArg<'_, R> {
fn register(&self, launcher: &mut KernelLauncher<R>) {
launcher.register_array(self)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cubecl-core/src/frontend/container/sequence/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub struct SequenceArg<'a, R: Runtime, T: LaunchArg> {
pub values: Vec<T::RuntimeArg<'a, R>>,
}

impl<'a, R: Runtime, T: LaunchArg> Default for SequenceArg<'a, R, T> {
impl<R: Runtime, T: LaunchArg> Default for SequenceArg<'_, R, T> {
fn default() -> Self {
Self::new()
}
Expand Down Expand Up @@ -72,7 +72,7 @@ impl<C: LaunchArg> LaunchArg for Sequence<C> {
}
}

impl<'a, R: Runtime, T: LaunchArg> ArgSettings<R> for SequenceArg<'a, R, T> {
impl<R: Runtime, T: LaunchArg> ArgSettings<R> for SequenceArg<'_, R, T> {
fn register(&self, launcher: &mut crate::prelude::KernelLauncher<R>) {
self.values.iter().for_each(|arg| arg.register(launcher));
}
Expand Down
4 changes: 2 additions & 2 deletions crates/cubecl-core/src/frontend/container/tensor/launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct TensorHandleRef<'a, R: Runtime> {
pub runtime: PhantomData<R>,
}

impl<'a, R: Runtime> core::fmt::Debug for TensorHandleRef<'a, R> {
impl<R: Runtime> core::fmt::Debug for TensorHandleRef<'_, R> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
writeln!(
f,
Expand Down Expand Up @@ -153,7 +153,7 @@ impl<'a, R: Runtime> TensorArg<'a, R> {
}
}

impl<'a, R: Runtime> ArgSettings<R> for TensorArg<'a, R> {
impl<R: Runtime> ArgSettings<R> for TensorArg<'_, R> {
fn register(&self, launcher: &mut KernelLauncher<R>) {
launcher.register_tensor(self)
}
Expand Down
3 changes: 3 additions & 0 deletions crates/cubecl-core/src/frontend/element/float/tensor_float.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![allow(clippy::transmute_int_to_float)] // Not yet stable in previous version. To be removed when
#![allow(clippy::transmute_float_to_int)] // prev=1.83.

use bytemuck::{Pod, Zeroable};
use core::ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Sub, SubAssign};
use half::f16;
Expand Down
2 changes: 1 addition & 1 deletion crates/cubecl-cpp/src/shared/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ struct EnsureBoolArg<'a, V: Display, D: Dialect> {
elem: &'a Elem<D>,
}

impl<'a, V: Display, D: Dialect> Display for EnsureBoolArg<'a, V, D> {
impl<V: Display, D: Dialect> Display for EnsureBoolArg<'_, V, D> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.elem != &Elem::Bool {
write!(f, "bool({})", self.var)
Expand Down
2 changes: 2 additions & 0 deletions crates/cubecl-linalg/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::manual_div_ceil)]

/// Contains matmul kernels and Cube components
pub mod matmul;

Expand Down

0 comments on commit eec39ba

Please sign in to comment.