-
Notifications
You must be signed in to change notification settings - Fork 406
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
Kokkos::sort
support custom comparator
#6253
Conversation
Kokkos::sort
: support custom comparator
Kokkos::sort
: support custom comparatorKokkos::sort
support custom comparator
This comment was marked as outdated.
This comment was marked as outdated.
retest this please |
23f7df8
to
5f494a2
Compare
retest this please |
1 similar comment
retest this please |
Only CI failure is related to #6293 |
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.
Would approve once we clarify whether the fence is needed or not
80edadb
to
6b39b4d
Compare
The failure is unrelated (timeout during one of the HIP build) |
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.
We could consider later to keep a buffer around (say 500k or so) which would for smaller views allow us to avoid the costly alloc/dealloc in the host copy case. But we can do that later.
Failure looks unrelated. |
* sort: support custom comparator * fix wrong call for sycl * tests: add cases for layout left and right * address reviews * more changes to address reviews * fix global namespace * fix namespace * slim function * use west const * remove fence not needed * use west const * enable format
Adds 2 overloads to
Kokkos::sort
to support a custom comparator.where:
calls cuda thrust for cuda, onedpl and the fallback case (for now) copies view to host, calls std::sort and copies back.
This solution is based on a discussion with @crtrott and @dalg24.
Note that this is potentially the place where we can later optimize for example implementing our own quicksort or what not.