Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard committed Apr 29, 2024
1 parent a238be1 commit 24d8c31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions crates/burn-jit/src/kernel/matmul/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ impl Default for Tiling2dConfig {
}

/// The strategy to be used when launching a matmul kernel.
#[derive(Default)]
pub enum MatmulStrategy {
/// A simple kernel will be used with memory coalescing optimization.
Simple {
Expand All @@ -99,15 +100,12 @@ pub enum MatmulStrategy {
Tiling2dPadded(Tiling2dConfig),
#[cfg(feature = "autotune")]
/// Using autotune to chose the best kernel based on runtime information.
#[default]
Autotune,
}

#[cfg(feature = "autotune")]
impl Default for MatmulStrategy {
fn default() -> Self {
MatmulStrategy::Autotune
}
}


#[cfg(not(feature = "autotune"))]
impl Default for MatmulStrategy {
Expand Down
8 changes: 3 additions & 5 deletions crates/burn-jit/src/kernel/reduce/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,17 @@ pub fn init_reduce_output<R: Runtime, EI: JitElement, EO: JitElement, const D: u

#[derive(Copy, Clone, Debug)]
#[allow(missing_docs)]
#[derive(Default)]
pub enum ReduceStrategy {
Naive,
SharedMemory,
#[cfg(feature = "autotune")]
#[default]
Autotune,
}

#[cfg(feature = "autotune")]
impl Default for ReduceStrategy {
fn default() -> Self {
ReduceStrategy::Autotune
}
}


#[cfg(not(feature = "autotune"))]
impl Default for ReduceStrategy {
Expand Down

0 comments on commit 24d8c31

Please sign in to comment.