-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert reduce_dim_naive
kernel to use the #[cube]
derive macro
#2117
Convert reduce_dim_naive
kernel to use the #[cube]
derive macro
#2117
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some changes to be done, but that's crazy how flexible cube is, I never though we would be able to migrate the reduce trait to cube with that amount of ease.
Yes, it's crazy that the code just looks like normal rust but is still handled correctly! Very nice that it works across traits as well |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2117 +/- ##
==========================================
- Coverage 86.21% 86.08% -0.13%
==========================================
Files 694 694
Lines 88854 88747 -107
==========================================
- Hits 76606 76399 -207
- Misses 12248 12348 +100 ☔ View full report in Codecov by Sentry. |
Pull Request Template
Following a discussion with @nathanielsimard on discord, I wanted to try to convert the reduce kernel to use the cube derive macro.
(originally because I wanted to know how to set the
CubeCount
for a kernel).The new macro is pretty ergonomic, it's actually crazy that it also works for
impl Trait
.I have a couple remaining issues though:
Checklist
CubeType
for a tuple ofCubeType
s: ImplementCubeType
for a tuple ofCubeTypes
cubecl#48Numeric
? Do I need to add a trait for it?CubeCount
run-checks all
script has been executed.Testing
Unit tests