Skip to content
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

Implement CUDA block- and warp-wide odd-even sort #347

Closed

Conversation

stephenswat
Copy link
Member

Sorting small arrays is a relatively common problem in GPGPU programming. Many useful algorithms exist, and some are provided by libraries like CUB. An algorithm close to my heart is odd-even sort because it is exceedingly simply, relatively efficient for small arrays and, importantly, it uses O(1) space. This commit adds new implementations of this sorting algorithm for warp- and block-wide thread groups in CUDA.

@stephenswat stephenswat added feature New feature or request cuda Changes related to CUDA labels Mar 16, 2023
@stephenswat stephenswat force-pushed the feat/cuda_sorting_utilities branch from 01cb554 to d9dc7a0 Compare March 16, 2023 12:57
Copy link
Member

@krasznaa krasznaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty much the same comments as in #346. With the addition that this code I'll really try to implement in a way so that it could be shared between CUDA and SYCL.

But that's not for this PR. Here we should just make sure that CUDA-specific code is not put into a public .hpp file.

Sorting small arrays is a relatively common problem in GPGPU
programming. Many useful algorithms exist, and some are provided by
libraries like CUB. An algorithm close to my heart is odd-even sort
because it is exceedingly simply, relatively efficient for small arrays
and, importantly, it uses O(1) space. This commit adds new
implementations of this sorting algorithm for warp- and block-wide
thread groups in CUDA.
@stephenswat stephenswat force-pushed the feat/cuda_sorting_utilities branch from d9dc7a0 to 2603fc0 Compare April 20, 2023 13:37
@stephenswat
Copy link
Member Author

Updated.

@stephenswat
Copy link
Member Author

Replaced by #632.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda Changes related to CUDA feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants