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

replace vendor specific sort calls with kokkos::sort using custom comparator #84

Open
cwsmith opened this issue Feb 8, 2024 · 0 comments
Labels
enhancement New feature or request frontier help wanted Extra attention is needed intel gpus thrust

Comments

@cwsmith
Copy link

cwsmith commented Feb 8, 2024

Kokkos 4.2.0 kokkos/kokkos#6197 is adding 'sort: support custom comparator kokkos/kokkos#6253'. We should try to replace the Intel DPL and HIP/CUDA Thrust sorting calls with this:

#if defined(OMEGA_H_USE_KOKKOS) and defined(OMEGA_H_USE_SYCL)
auto space = Kokkos::Experimental::SYCL();
const auto q = *space.impl_internal_space_instance()->m_queue;
auto policy = ::oneapi::dpl::execution::make_device_policy(q);
oneapi::dpl::sort(policy,b,e,c);
#elif defined(OMEGA_H_USE_CUDA) || defined(OMEGA_H_USE_HIP)
auto bptr = thrust::device_ptr<T>(b);
auto eptr = thrust::device_ptr<T>(e);
thrust::stable_sort(bptr, eptr, c);
#elif defined(OMEGA_H_USE_OPENMP)

@cwsmith cwsmith added enhancement New feature or request help wanted Extra attention is needed thrust frontier intel gpus labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontier help wanted Extra attention is needed intel gpus thrust
Projects
None yet
Development

No branches or pull requests

1 participant