pub struct KernelSku {
pub category: OpCategory,
pub op: u16,
pub element: ElementKind,
pub aux_element: Option<ElementKind>,
pub layout: Option<LayoutSku>,
pub epilogue: Option<EpilogueKind>,
pub arch: ArchSku,
pub backend: BackendKind,
pub precision_guarantee: PrecisionGuarantee,
}Expand description
Generalized kernel SKU — covers every op category.
Replaces / generalizes the GEMM-specific GemmSku used by Phase 1/2
plan types. Phase 3+ plan types (UnaryPlan, BinaryPlan,
TernaryPlan, …) populate and return this struct from their
sku() accessor.
The op field is a category-local discriminant — its
interpretation depends on category. For
OpCategory::BinaryElementwise it’s a BinaryKind as u16; for
OpCategory::UnaryElementwise it’s a UnaryKind as u16; etc.
Surfacing it as a flat u16 (rather than a per-category enum) keeps
the struct shape stable across categories so it can be hashed into
autotuner caches uniformly.
Fields§
§category: OpCategoryOp category. Primary axis for telemetry / selector dispatch.
op: u16Category-local op discriminant. Interpret against the per-category
*Kind enum that the category’s Plan type uses.
element: ElementKindPrimary element type the kernel operates on.
aux_element: Option<ElementKind>Auxiliary element type, when meaningful (bias element for GEMM
bias epilogues, index element for gather / scatter, output cast
type for ops that produce a different dtype than the input).
None when the op has no auxiliary element.
layout: Option<LayoutSku>Layout discriminant for matrix-multiply-shaped kernels. None
for op categories that don’t have a row/col layout dimension
(elementwise, reduce, scan, …).
epilogue: Option<EpilogueKind>Epilogue discriminant for matrix-multiply-shaped kernels. None
for op categories that don’t fuse a GEMM epilogue chain.
arch: ArchSkuCompute capability the selected kernel was compiled for.
backend: BackendKindWhich underlying compute path served this SKU.
precision_guarantee: PrecisionGuaranteeNumerical guarantees this SKU provides.