Skip to content

Commit

Permalink
gpu: nvidia: Added support for native host task extension
Browse files Browse the repository at this point in the history
  • Loading branch information
ShanoToni committed Sep 25, 2024
1 parent da6d11b commit bb561af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/gpu/nvidia/sycl_cuda_compat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ T get_native_mem(const interop_handle &ih, U acc) {
ih.get_native_mem<::sycl::backend::ext_oneapi_cuda>(acc));
}

template <typename T>
void host_task(::sycl::handler &cgh, const T &task) {
template <typename HandlerT, typename FnT>
void host_task(HandlerT &cgh, const FnT &task) {
#ifdef SYCL_EXT_ONEAPI_ENQUEUE_NATIVE_COMMAND
cgh.ext_codeplay_enqueue_native_command(task);
#else
cgh.host_task(task);
#endif
}

template <typename native_object_t, typename sycl_object_t,
Expand Down

0 comments on commit bb561af

Please sign in to comment.