Skip to content

Commit 0ad6699

Browse files
Fix: autotune errors with fusion (added fallback) (#3778)
1 parent 59bcfba commit 0ad6699

File tree

1 file changed

+6
-1
lines changed
  • crates/burn-cubecl-fusion/src/matmul

1 file changed

+6
-1
lines changed

crates/burn-cubecl-fusion/src/matmul/tune.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,12 @@ fn tune_fused<R: Runtime, BT: CubeElement, S: MatmulVariantSelection>(
177177
let context = input.context();
178178

179179
match context {
180-
TuneContext::Original(context) => optimization.execute_fused::<BT, S>(context),
180+
TuneContext::Original(context) => match optimization.execute_fused::<BT, S>(context) {
181+
Ok(out) => Ok(out),
182+
Err(_) => {
183+
return tune_fallback::<R, BT>(input);
184+
}
185+
},
181186
TuneContext::Fork(mut context_owned) => {
182187
optimization.execute_fused::<BT, S>(&mut context_owned.as_context())
183188
}

0 commit comments

Comments
 (0)