Add more primitives to list in when parsing Expression. Fixes proble… #384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…ms when trying to cast using u8, u16, and more.
Fixes #382
After lots of dbg printing in the proc macros I tracked this down to missing an associated type when u8, u16 was involved in casting.
Turns out the primitives was just missing from a list of primitives in
crates/cubecl-macros/src/parse/expression.rs
.I expanded that list to have more of the base primitives, and added some more frontend tests to ensure kernels using these compile.
I'm using this change locally to write some kernels involving u16 casting and it seems to work as I'd expect.