1use crate::kernel::{
2 conv::{ConvAutotuneKey, ConvTranspose2dAutotuneKey},
3 reduce::SumAutotuneKey,
4};
5use cubecl::tune::AutotuneKey;
6use serde::{Deserialize, Serialize};
7use std::fmt::Display;
8
9#[derive(Hash, Eq, PartialEq, Debug, Clone, Serialize, Deserialize)]
10pub enum CubeAutotuneKey {
12 Sum(SumAutotuneKey),
14 Conv(ConvAutotuneKey),
16 ConvTranspose(ConvTranspose2dAutotuneKey),
18}
19
20impl Display for CubeAutotuneKey {
21 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22 match self {
23 CubeAutotuneKey::Sum(reduce_key) => std::fmt::Debug::fmt(&reduce_key, f),
24 CubeAutotuneKey::Conv(conv_key) => std::fmt::Debug::fmt(&conv_key, f),
25 CubeAutotuneKey::ConvTranspose(conv_key) => std::fmt::Debug::fmt(&conv_key, f),
26 }
27 }
28}
29
30impl AutotuneKey for CubeAutotuneKey {}