From cfe0b0204380cbd0931f478194a053a6ac35d1cb Mon Sep 17 00:00:00 2001 From: Periwink Date: Thu, 8 Aug 2024 14:53:30 -0400 Subject: [PATCH] add comment (#50) --- crates/cubecl-runtime/src/tune/local.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/cubecl-runtime/src/tune/local.rs b/crates/cubecl-runtime/src/tune/local.rs index eda3bf2f..0e413235 100644 --- a/crates/cubecl-runtime/src/tune/local.rs +++ b/crates/cubecl-runtime/src/tune/local.rs @@ -54,6 +54,8 @@ impl LocalTuner, { // We avoid locking in write mode when possible. + // (this makes us potentially check the cache twice, but allows to avoid + // locking the state if the cache is hit) if let Some(state) = self.state.read().as_ref() { if let Some(tuner) = state.get(id) { let key = autotune_operation_set.key();