Trait AutotuneOperationSet

Source
pub trait AutotuneOperationSet<K, Output = ()>: Send
where K: Send + 'static, Output: Send + 'static,
{ // Required methods fn key(&self) -> K; fn autotunables(&self) -> Vec<Box<dyn AutotuneOperation<Output>>>; fn fastest( self: Box<Self>, fastest_index: usize, ) -> Box<dyn AutotuneOperation<Output>>; // Provided methods fn compute_checksum(&self) -> String { ... } fn should_run(&self, key: &K, index: usize) -> bool { ... } }
Expand description

Groups operations of the same type for autotune

Required Methods§

Source

fn key(&self) -> K

The key used in the tune cache

Source

fn autotunables(&self) -> Vec<Box<dyn AutotuneOperation<Output>>>

All candidate operations for autotuning this operation type Operations can run on toy tensors of relevant size

Source

fn fastest( self: Box<Self>, fastest_index: usize, ) -> Box<dyn AutotuneOperation<Output>>

Returns the operation for the given index, matching the order returned by autotunables. Operation obtained here runs on original tensors Nb: The 0 index is used a “good default”.

Provided Methods§

Source

fn compute_checksum(&self) -> String

Compute a checksum that can invalidate outdated cached auto-tune results.

Source

fn should_run(&self, key: &K, index: usize) -> bool

Enable or disable certain indices from being benchmarked based on the key

Implementors§