Skip to content

Commit

Permalink
Don't check const arguments for SquareType
Browse files Browse the repository at this point in the history
  • Loading branch information
wingertge committed Aug 22, 2024
1 parent 0a784af commit 4f53194
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/cubecl-macros-2/src/generate/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 4f53194

Please sign in to comment.