pub struct Tuner<K>where
K: AutotuneKey,{ /* private fields */ }
Expand description
Executes autotune benchmarking and caching
Implementations§
Source§impl<K> Tuner<K>where
K: AutotuneKey,
impl<K> Tuner<K>where
K: AutotuneKey,
Sourcepub fn new(name: &str, device_id: &str) -> Tuner<K>
pub fn new(name: &str, device_id: &str) -> Tuner<K>
Returns a tuner with cache initialized from persistent cache
Sourcepub fn fastest(&self, key: &K) -> TuneCacheResult
pub fn fastest(&self, key: &K) -> TuneCacheResult
Fetch the fastest autotune operation index for an autotune key.
Sourcepub fn validate_checksum(&mut self, key: &K, checksum: &str)
pub fn validate_checksum(&mut self, key: &K, checksum: &str)
Fetch the fastest autotune operation index for an autotune key and validate the checksum.
Sourcepub fn handle_results(&mut self)
pub fn handle_results(&mut self)
Check if any autotuning results have come in asynchronously.
Sourcepub fn prepare_autotune<S, C, In, Out>(
&self,
key: K,
inputs: &In,
tunables: &TunableSet<K, In, Out>,
client: &ComputeClient<S, C>,
) -> Box<dyn FnOnce()>where
S: ComputeServer + 'static,
C: ComputeChannel<S> + 'static,
In: Clone + Send + 'static,
Out: AutotuneOutput,
pub fn prepare_autotune<S, C, In, Out>(
&self,
key: K,
inputs: &In,
tunables: &TunableSet<K, In, Out>,
client: &ComputeClient<S, C>,
) -> Box<dyn FnOnce()>where
S: ComputeServer + 'static,
C: ComputeChannel<S> + 'static,
In: Clone + Send + 'static,
Out: AutotuneOutput,
Execute benchmarks to find out what the fastest operation is.
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>
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