Skip to content

Commit

Permalink
add comment (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
cBournhonesque authored Aug 8, 2024
1 parent 30d090c commit cfe0b02
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/cubecl-runtime/src/tune/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ impl<AK: AutotuneKey, ID: Hash + PartialEq + Eq + Clone + Display> LocalTuner<AK
C: ComputeChannel<S>,
{
// 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();
Expand Down

0 comments on commit cfe0b02

Please sign in to comment.