Trait cubecl_runtime::tune::AutotuneOperationSet

source ·
pub trait AutotuneOperationSet<K, Output = ()>: Send {
    // 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 method
    fn compute_checksum(&self) -> String { ... }
}
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

Provided Methods§

source

fn compute_checksum(&self) -> String

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

Implementors§