use cubecl_ir::{ElemType, Scope, metadata::Info, settings::KernelSettings};
use cubecl_runtime::kernel::KernelDefinition;
#[derive(Debug)]
pub struct KernelIntegrator {
expansion: KernelExpansion,
}
#[derive(Debug)]
pub struct KernelExpansion {
pub scope: Scope,
pub info: Info,
}
#[derive(Clone, Debug)]
pub struct ScalarInfo {
pub ty: ElemType,
pub count: usize,
}
impl KernelIntegrator {
pub fn new(info: KernelExpansion) -> Self {
Self { expansion: info }
}
#[cfg_attr(feature = "tracing", tracing::instrument(level = "trace", skip(self)))]
pub fn integrate(self, settings: KernelSettings) -> KernelDefinition {
KernelDefinition {
body: self.expansion.scope,
info: self.expansion.info,
settings,
}
}
}