Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate/jit/matmul tiling 2d #1472

Merged
merged 28 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix autotune + unroll
  • Loading branch information
nathanielsimard committed Mar 20, 2024
commit 66076dbe0f721d84c368b210fa87a12b2aac8ee2
5 changes: 1 addition & 4 deletions crates/burn-jit/src/kernel/matmul/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,9 @@
}

#[cfg(feature = "autotune")]
impl Default for MatmulStrategy {

Check failure on line 101 in crates/burn-jit/src/kernel/matmul/base.rs

View workflow job for this annotation

GitHub Actions / clippy

[clippy] crates/burn-jit/src/kernel/matmul/base.rs#L101

error: this `impl` can be derived --> crates/burn-jit/src/kernel/matmul/base.rs:101:1 | 101 | / impl Default for MatmulStrategy { 102 | | fn default() -> Self { 103 | | MatmulStrategy::Autotune 104 | | } 105 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls = note: `-D clippy::derivable-impls` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]` = help: remove the manual implementation... help: ...and instead derive it... | 83 + #[derive(Default)] 84 | pub enum MatmulStrategy { | help: ...and mark the default variant | 97 ~ #[default] 98 ~ Autotune, |
Raw output
crates/burn-jit/src/kernel/matmul/base.rs:101:1:e:error: this `impl` can be derived
   --> crates/burn-jit/src/kernel/matmul/base.rs:101:1
    |
101 | / impl Default for MatmulStrategy {
102 | |     fn default() -> Self {
103 | |         MatmulStrategy::Autotune
104 | |     }
105 | | }
    | |_^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
    = note: `-D clippy::derivable-impls` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`
    = help: remove the manual implementation...
help: ...and instead derive it...
    |
83  + #[derive(Default)]
84  | pub enum MatmulStrategy {
    |
help: ...and mark the default variant
    |
97  ~     #[default]
98  ~     Autotune,
    |


__END__
fn default() -> Self {
MatmulStrategy::Simple {
grid_x: 32,
grid_y: 32,
}
MatmulStrategy::Autotune
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/burn-jit/src/kernel/matmul/tiling2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl<R: Runtime> DynamicKernelSource for MatmulTiling2dEagerKernel<R> {
variables: gpu::BinaryOperator { lhs, rhs, out },
config: self.config.clone(),
bounds_check_required: self.bounds_check_required,
unroll: false,
unroll: true,
}
.expand(&mut scope);

Expand Down
Loading