use cubecl_common::ExecutionMode;
use crate::{compute::KernelDefinition, ir::ElemType};
pub trait Compiler: Sync + Send + 'static + Clone + core::fmt::Debug {
type Representation: core::fmt::Display;
type CompilationOptions: Send + Default + core::fmt::Debug;
fn compile(
&mut self,
kernel: KernelDefinition,
compilation_options: &Self::CompilationOptions,
mode: ExecutionMode,
) -> Self::Representation;
fn elem_size(&self, elem: ElemType) -> usize;
fn extension(&self) -> &'static str;
}
#[derive(Clone, Debug, Default)]
pub struct WgpuCompilationOptions {
pub supports_fp_fast_math: bool,
pub supports_u64: bool,
pub supports_explicit_smem: bool,
}