Struct cubecl_runtime::tune::Tuner
source · pub struct Tuner<K: AutotuneKey> { /* private fields */ }
Expand description
Executes autotune benchmarking and caching
Implementations§
source§impl<K: AutotuneKey> Tuner<K>
impl<K: AutotuneKey> Tuner<K>
sourcepub fn new(name: &str, device_id: &str) -> Self
pub fn new(name: &str, device_id: &str) -> Self
Returns a tuner with cache initialized from persistent cache
sourcepub fn autotune_fastest(&self, key: &K) -> Option<usize>
pub fn autotune_fastest(&self, key: &K) -> Option<usize>
Fetch the fastest autotune operation index for an autotune key.
sourcepub fn execute_autotune<S, C, Out>(
&mut self,
autotune_operation_set: Box<dyn AutotuneOperationSet<K, Out>>,
client: &ComputeClient<S, C>,
) -> Outwhere
S: ComputeServer,
C: ComputeChannel<S>,
pub fn execute_autotune<S, C, Out>(
&mut self,
autotune_operation_set: Box<dyn AutotuneOperationSet<K, Out>>,
client: &ComputeClient<S, C>,
) -> Outwhere
S: ComputeServer,
C: ComputeChannel<S>,
Execute the fastest autotune operation if known, otherwise perform some benchmarks before.
Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for Tuner<K>
impl<K> RefUnwindSafe for Tuner<K>where
K: RefUnwindSafe,
impl<K> Send for Tuner<K>
impl<K> Sync for Tuner<K>
impl<K> Unpin for Tuner<K>where
K: Unpin,
impl<K> UnwindSafe for Tuner<K>where
K: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more