From 76df6e47f70d1af487655a5d215f90283e754af9 Mon Sep 17 00:00:00 2001 From: Genna Wingert Date: Sat, 17 Aug 2024 14:30:17 +0200 Subject: [PATCH] Print message to inform user an error is handled gracefully. --- crates/cubecl-runtime/src/tune/tuner.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/cubecl-runtime/src/tune/tuner.rs b/crates/cubecl-runtime/src/tune/tuner.rs index b794568a..1d25c95f 100644 --- a/crates/cubecl-runtime/src/tune/tuner.rs +++ b/crates/cubecl-runtime/src/tune/tuner.rs @@ -122,7 +122,10 @@ impl Tuner { catch_unwind(AssertUnwindSafe(|| { TuneBenchmark::new(operation, client.clone()).run() })) - .map_err(ManuallyDrop::new) + .map_err(|e| { + println!("Caught error while benchmarking, falling back to next operation."); + ManuallyDrop::new(e) + }) } #[cfg(not(feature = "std"))] Ok(TuneBenchmark::new(operation, client.clone()).run())