Skip to content

Commit

Permalink
Fix burn-jit compile error (#1803)
Browse files Browse the repository at this point in the history
  • Loading branch information
DieracDelta committed May 24, 2024
1 parent ef4646c commit 1670a71
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions crates/burn-jit/src/kernel/reduce/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,24 @@ pub fn init_reduce_output<R: JitRuntime, EI: JitElement, EO: JitElement, const D

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

impl Default for ReduceStrategy {
fn default() -> Self {
// if autotune is enabled, default to autotune
#[cfg(feature = "autotune")]
return ReduceStrategy::Autotune;

#[cfg(not(feature = "autotune"))]
ReduceStrategy::Naive
}
}

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

0 comments on commit 1670a71

Please sign in to comment.