-
Notifications
You must be signed in to change notification settings - Fork 115
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 merge-sort when sub/work group size is small #2002
Fix merge-sort when sub/work group size is small #2002
Conversation
On some implementations, the max subgroup size is 1, which is too small for the sorting algorithm to produce correct results. Make the value at least 4.
@carbotaniuman, thanks for noting that issue. I would propose a slightly different approach correcting the chunk size, which appears to be more robust.
|
I tested the change on my local installation and it produces the correct results with the new change. |
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.
LGTM, but I would ask @MikeDvorskiy to check the changes as well. I may be biased because I also contributed.
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.
LGTM
@carbotaniuman, thank you once again. If you want your contributions to be mentioned in CREDITS.txt, do not hesitate to create a PR with their brief descriptions targeting that file. |
__max_sg_size
is at least 4 in sort
On some implementations, the max subgroup size is 1, which is too small for the sorting algorithm to produce correct results. Make the value at least 4.