cubecl_runtime/kernel.rs
1use crate::id::KernelId;
2
3/// Implement this trait to create a [kernel definition](KernelDefinition).
4pub trait KernelMetadata: Send + Sync + 'static {
5 /// Name of the kernel for debugging.
6 fn name(&self) -> &'static str {
7 core::any::type_name::<Self>()
8 }
9
10 /// Identifier for the kernel, used for caching kernel compilation.
11 fn id(&self) -> KernelId;
12}