-
Notifications
You must be signed in to change notification settings - Fork 443
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
Fix Kokkos_Sort when using integer and HIP #4570
Conversation
Retest this please |
any idea? |
That's the error we tried to fix for |
I've rebased on develop. Let's see if that helps |
Rebasing didn't help :/ |
I think we just need to adapt the test for SYCL in some way... |
@Rombur mul_(std::is_integral<typename KeyViewType::const_value_type>::value
? 1.0 * max_bins__ / (int64_t(max) - int64_t(min))
: 1.0 * max_bins__ / (max - min)), Does it give wrong result all the time or only for certain values of the parameters? |
Hmm it looks like the problem is integer overflow. Not sure why I thought it wasn't. |
@Rombur can you address francescos comment? |
I already did |
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.
I guess we postpone adding a test tailored to check this?
This is a fix required by
vtkm
. There is something weird happening with integer arithmetic and HIP. I don't understand why but some integer operations that should be fine (i.e. there is no overflow) are wrong. Casting toint64_t
fixes the problem.