-
Notifications
You must be signed in to change notification settings - Fork 407
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
Detect join member function with volatile-qualified arguments #4951
Conversation
Thanks! |
One test failure in Jenkins, on OpenMPTarget:
|
In kokkos-kernels
|
There may be misbehavior in the case where We may need separate |
Removing the overload lets that pass. |
dalg24#3 makes the overload a compilation error, rather than a silent runtime failure. Not sure it's a great path, but it does encourage code cleanup! |
With the above addition to the PR, kokkos/kokkos-kernels#1382 is the minimal change to Kokkos Kernels to compile on OpenMP and CUDA and pass its tests on both |
The OpenMPTarget failure may have something to do with making this call: Kokkos::parallel_reduce(Kokkos::RangePolicy<ExecSpace, ReducerTag>(0, N),
f_tag, reducer_scalar); On a type |
Your revision looks good. Could you test that in the overloaded join case, the non qualified version gets selected? In my reading, that's what it looks like the code will do, but I'd like to see it ensured. Should we include a runtime test that operator+= isn't being called in any of those cases? Maybe add an operator+= implementation that just fails the test to your compile test type definition, and make it runnable? |
* Add test for backwards compatible join() detection * Remove names of unused parameters to quiet warnings * Mark as device/inline to be right-er and maybe suppress unused function warning
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.
Looks good to me.
…low device compilation
…rename to avoid potential ODR violation
I tested this with kokkos-kernels I think we should merge this to unbreak KK CI testing, and follow-up with any further tests or refinements. So, marking this 'Ready' |
May also fix #4941; testing now |
retest this please |
@dalg24 if this passes merge. |
Hotfix for #4931
For backward compatibility, make sure that user-defined reducer that only had a
join
member function that takes arguments with the volatile type qualifier are not rejected.Fixes: #4952, #4941