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

Matmul: kernel select heuristic #312

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 4 additions & 2 deletions crates/cubecl-linalg/src/matmul/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ pub fn launch_ref<R: Runtime, EG: Float>(
out: TensorHandleRef<R>,
) {
match strategy {
Strategy::Accelerated => matmul::launch_ref::<R, EG>(client, lhs, rhs, out, false),
Strategy::PlaneMma => matmul::launch_ref::<R, EG>(client, lhs, rhs, out, true),
Strategy::Accelerated => matmul::launch_ref::<R, EG>(client, lhs, rhs, out, false)
.expect("Accelerated strategy should be available on your device"),
Strategy::PlaneMma => matmul::launch_ref::<R, EG>(client, lhs, rhs, out, true)
.expect("PlaneMma strategy should be available on your device"),
Strategy::CmmaOld(config) => {
cmma_old::launch_ref::<R, EG>(client, lhs, rhs, out, config.clone())
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,8 @@ pub trait Algorithm<EG: Numeric> {
) -> Result<(), &str> {
Self::BatchMatmul::check_availability::<R>(client)
}

fn advanced_config() -> AdvancedConfig {
AdvancedConfig::default()
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
mod base;
mod selection;
mod selector;

pub mod cmma;
pub mod plane_mma;
pub mod standard;

pub use base::Algorithm;
pub use selection::*;
pub use selector::*;

This file was deleted.

This file was deleted.

Loading