diff --git a/crates/cubecl-macros-2/src/generate/kernel.rs b/crates/cubecl-macros-2/src/generate/kernel.rs index 613cfa89..042c0b98 100644 --- a/crates/cubecl-macros-2/src/generate/kernel.rs +++ b/crates/cubecl-macros-2/src/generate/kernel.rs @@ -22,6 +22,9 @@ impl ToTokens for Kernel { let input_checks = self .parameters .iter() + // Const can be anything as long as the accessed fields are cube types, since the access + // gets resolved at expansion time and collapsed into a literal in the kernel + .filter(|(_, _, is_const)| !is_const) .map(|(_, ty, _)| { let span = ty.span(); let check = prefix_ir(format_ident!("assert_valid_type"));