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 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: ComputeServer + 'static, C: ComputeChannel<S> + 'static, In: Clone + Send + 'static, Out: AutotuneOutput>(
&self,
key: K,
inputs: &In,
tunables: &TunableSet<K, In, Out>,
client: &ComputeClient<S, C>,
) -> Box<dyn FnOnce()>
pub fn prepare_autotune<S: ComputeServer + 'static, C: ComputeChannel<S> + 'static, In: Clone + Send + 'static, Out: AutotuneOutput>( &self, key: K, inputs: &In, tunables: &TunableSet<K, In, Out>, client: &ComputeClient<S, C>, ) -> Box<dyn FnOnce()>
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