Replies: 3 comments
-
We should try using Thrust whenever available, even for host side sorting. This should be possible, but I'm not sure if Thrust has to be configured first to allow for that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Two PRs in Kokkos improved |
Beta Was this translation helpful? Give feedback.
0 replies
-
Did a lightning talk at Kokkos User Group Meeting on 12/12/2023. Opened kokkos/kokkos#6668. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In general, we have multiple issues/challenges associated with sort. The goal of this discussion is to gather all of them together in one place.
Interface
The current interface gets a view of values, sorts it and returns a permutation. There are several issues with this:
In situations where we don't need permutation, we get a penalty.
The best standard to align with is probably Thrust, which provides
sort
,stable_sort
,sort_by_key
,stable_sort_by_key
General performance issues
BinSort beats std::sort for larger number of values in Serial and OpenMP, but only for some problems. In others, std::sort may be 3x faster.
Issues with
Kokkos::BinSort
It gets progressively slower with increased percentage of duplicates. In the worst case, it takes forever.
Kokkos::Pair
)std::sort
in some situationsThrust::sort_by_key
sort_by_key
Which is OK when we only want permutation indices, but not OK when we want other values as that requires two calls to sort.
Attempts so far
Ran into the performance penalty of lacking sort_by_key in Kokkos
Beta Was this translation helpful? Give feedback.
All reactions