-
Notifications
You must be signed in to change notification settings - Fork 125
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
Kokkos reverse mode improvements #1116
Conversation
clang-tidy review says "All clean, LGTM! 👍" |
fbba1ec
to
8fd700c
Compare
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
Kokkos::resize
in the rvs mode
@kliegeois, @brian-kelley can you take a look? |
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.
This looks fine to me! My only suggestion is that you could probably get away with hardcoding size_t
as the type for all the resize dimensions and their derivatives, since those arguments to Kokkos::resize
are always size_t.
Thanks for the comment. I am confused, are you suggesting reduce the template specializations to one which takes a size_t argument? |
@vgvassilev size_t wouldn't have to be a template argument anymore, but the View being resized still does. So instead of
it could just be
|
I think it's better to keep these as templates, since sometimes Clad generates numerical values of different types depending on the argument and thus may fail to find this custom derivative in some edge cases (such as when using both literal and variable indices of different types as arguments). |
Can we check if that is really limitation? If we can drop all of these template arguments it would be become significantly more readable. |
25c180a
to
5d959de
Compare
5d959de
to
56e4faa
Compare
I've rebased this PR and managed to reduce the number of lines by having |
clang-tidy review says "All clean, LGTM! 👍" |
@brian-kelley, were these changes what you were aiming for? |
@vgvassilev @gojakuch Yes, that's what I had in mind. Thanks! |
No description provided.