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 register_autotune<Out: Send>(
&mut self,
result: AutotuneResult<K, Out>,
) -> Out
pub fn register_autotune<Out: Send>( &mut self, result: AutotuneResult<K, Out>, ) -> Out
Registers the results from execute_autotune().
Sourcepub fn fastest_with_checksum<Out: Send>(
&mut self,
set: &dyn AutotuneOperationSet<K, Out>,
) -> TuneCacheResult
pub fn fastest_with_checksum<Out: Send>( &mut self, set: &dyn AutotuneOperationSet<K, Out>, ) -> TuneCacheResult
Fetch the fastest autotune operation index for an autotune key and validate the checksum.
Sourcepub fn execute_autotune<S, C, Out: Send + 'static>(
&self,
set: Box<dyn AutotuneOperationSet<K, Out>>,
client: &ComputeClient<S, C>,
) -> AutotuneResult<K, Out>where
S: ComputeServer + 'static,
C: ComputeChannel<S> + 'static,
pub fn execute_autotune<S, C, Out: Send + 'static>(
&self,
set: Box<dyn AutotuneOperationSet<K, Out>>,
client: &ComputeClient<S, C>,
) -> AutotuneResult<K, Out>where
S: ComputeServer + 'static,
C: ComputeChannel<S> + 'static,
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