You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a few spots the following logic has been implemented during the HIP backend work: #if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
one could probably replace that with #if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST)
to selectively enable blocks of code when the compiler is not targeting a device or we could add the following macro in KokkosKernels_macros.hpp:
@lucbv I don't think KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST is an exact replacement, since it is defined for host code in a cuda-enabled build (defined(KOKKOS_ENABLE_CUDA) && !defined(__CUDA_ARCH__)). I think adding the HOST_ONLY macro would make sense. Even better would be to avoid macros and use templated constexpr functions like kk_is_gpu_exec_space<ExecutionSpace>(), but I know that's not possible everywhere.
Yeah, I think in the case of the trtri and trmm tests the compiler would just complain about the use of a host function in a device function so the macro is probably the right approach, but in other cases I do like the templated constexpr function approach. I will make a PR for the new macro tonight.
In a few spots the following logic has been implemented during the HIP backend work:
#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
one could probably replace that with
#if defined(KOKKOS_ACTIVE_EXECUTION_MEMORY_SPACE_HOST)
to selectively enable blocks of code when the compiler is not targeting a device or we could add the following macro in
KokkosKernels_macros.hpp
:@brian-kelley do you have an opinion?
The text was updated successfully, but these errors were encountered: