#[derive(AutotuneKey)]
{
// Attributes available to this derive:
#[autotune]
}
Expand description
Implements display and initialization for autotune keys.
§Helper
Use the #[autotune(anchor)] helper attribute to anchor a numerical value.
This groups multiple numerical values into the same bucket.
For now, only an exponential function is supported, and it can be modified
with exp. By default, the base is ‘2’ and there are no min or max
provided.
§Example
ⓘ
#[derive(AutotuneKey, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub struct OperationKey {
#[autotune(name = "Batch Size")]
batch_size: usize,
channels: usize,
#[autotune(anchor(exp(min = 16, max = 1024, base = 2)))]
height: usize,
#[autotune(anchor)]
width: usize,
}