-
Notifications
You must be signed in to change notification settings - Fork 436
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
Mark as_view_of_rank_n as KOKKOS_FUNCTION #5248
Mark as_view_of_rank_n as KOKKOS_FUNCTION #5248
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.
Thanks. Sorry I missed this when I added it
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.
Approving, come to think of that however it feels like the specialization of as_view_of_rank_n
for normal Views probably should move to Kokkos_DynRankView too.
I think I had some reason for keeping it there, perhaps to support other things that might need genericity over rank (hello, Sacado), separate from |
if (v.rank() != N) { | ||
Kokkos::Impl::throw_runtime_exception( |
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.
Switching from an exception to Kokkos::abort
means that the unit test for the error case can no longer catch it.
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.
Death test is an option but doing it on the device gets annoying pretty quickly considering the current support in various backends
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.
Having seen the error case test working previously, I'd be ok with dropping it
Failure are unrelated (machine ran out of disk space) |
We are using this function in other
KOKKOS_FUNCTION
functions.