Skip to content

Commit

Permalink
Merge pull request #886 from lucbv/openmp_target_backend
Browse files Browse the repository at this point in the history
OpenMPTarget: adding ETI and CMake logic for OpenMPTarget backend
  • Loading branch information
lucbv authored Apr 23, 2021
2 parents fc55227 + 5e63aa3 commit 93b24bd
Show file tree
Hide file tree
Showing 20 changed files with 238 additions and 76 deletions.
13 changes: 7 additions & 6 deletions cmake/KokkosKernelsConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ include(CMakeFindDependencyMacro)

find_dependency(Kokkos HINTS @Kokkos_DIR@)

SET(Kokkos_ENABLE_OPENMP @Kokkos_ENABLE_OPENMP@)
SET(Kokkos_ENABLE_CUDA @Kokkos_ENABLE_CUDA@)
SET(Kokkos_ENABLE_HIP @Kokkos_ENABLE_HIP@)
SET(Kokkos_ENABLE_SYCL @Kokkos_ENABLE_SYCL@)
SET(Kokkos_ENABLE_PTHREAD @Kokkos_ENABLE_PTHREAD@)
SET(Kokkos_ENABLE_SERIAL @Kokkos_ENABLE_SERIAL@)
SET(Kokkos_ENABLE_OPENMP @Kokkos_ENABLE_OPENMP@)
SET(Kokkos_ENABLE_OPENMPTARGET @Kokkos_ENABLE_OPENMPTARGET@)
SET(Kokkos_ENABLE_CUDA @Kokkos_ENABLE_CUDA@)
SET(Kokkos_ENABLE_HIP @Kokkos_ENABLE_HIP@)
SET(Kokkos_ENABLE_SYCL @Kokkos_ENABLE_SYCL@)
SET(Kokkos_ENABLE_PTHREAD @Kokkos_ENABLE_PTHREAD@)
SET(Kokkos_ENABLE_SERIAL @Kokkos_ENABLE_SERIAL@)

INCLUDE("${KokkosKernels_CMAKE_DIR}/KokkosKernelsTargets.cmake")

3 changes: 3 additions & 0 deletions cmake/KokkosKernels_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@
#cmakedefine KOKKOSKERNELS_INST_EXECSPACE_SYCL
#cmakedefine KOKKOSKERNELS_INST_MEMSPACE_SYCLSPACE
#cmakedefine KOKKOSKERNELS_INST_MEMSPACE_SYCLSHAREDSPACE
/* Whether to build kernels for execution space Kokkos::Experimental::HIP */
#cmakedefine KOKKOSKERNELS_INST_EXECSPACE_OPENMPTARGET
#cmakedefine KOKKOSKERNELS_INST_MEMSPACE_OPENMPTARGETSPACE
/* Whether to build kernels for execution space Kokkos::OpenMP */
#cmakedefine KOKKOSKERNELS_INST_EXECSPACE_OPENMP
/* Whether to build kernels for execution space Kokkos::Threads */
Expand Down
7 changes: 4 additions & 3 deletions cmake/kokkos_backends.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ MACRO(CHECK_KOKKOS_BACKEND BE)
SET(KOKKOSKERNELS_INST_EXECSPACE_${BE}_DEFAULT ${KOKKOS_ENABLE_${BE}})
ENDMACRO(CHECK_KOKKOS_BACKEND)

CHECK_KOKKOS_BACKEND(SERIAL)
CHECK_KOKKOS_BACKEND(PTHREAD)
CHECK_KOKKOS_BACKEND(OPENMP)
CHECK_KOKKOS_BACKEND(OPENMPTARGET)
CHECK_KOKKOS_BACKEND(CUDA)
CHECK_KOKKOS_BACKEND(HIP)
CHECK_KOKKOS_BACKEND(SYCL)
CHECK_KOKKOS_BACKEND(OPENMP)
CHECK_KOKKOS_BACKEND(PTHREAD)
CHECK_KOKKOS_BACKEND(SERIAL)
67 changes: 47 additions & 20 deletions cmake/kokkoskernels_eti_devices.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,37 @@ SET(EXEC_SPACES
EXECSPACE_CUDA
EXECSPACE_HIP
EXECSPACE_SYCL
EXECSPACE_OPENMPTARGET
EXECSPACE_OPENMP
EXECSPACE_PTHREAD
EXECSPACE_SERIAL
)
SET(EXECSPACE_CUDA_CPP_TYPE Kokkos::Cuda)
SET(EXECSPACE_HIP_CPP_TYPE Kokkos::Experimental::HIP)
SET(EXECSPACE_SYCL_CPP_TYPE Kokkos::Experimental::SYCL)
SET(EXECSPACE_OPENMP_CPP_TYPE Kokkos::OpenMP)
SET(EXECSPACE_PTHREAD_CPP_TYPE Kokkos::Threads)
SET(EXECSPACE_SERIAL_CPP_TYPE Kokkos::Serial)
SET(EXECSPACE_CUDA_CPP_TYPE Kokkos::Cuda)
SET(EXECSPACE_HIP_CPP_TYPE Kokkos::Experimental::HIP)
SET(EXECSPACE_SYCL_CPP_TYPE Kokkos::Experimental::SYCL)
SET(EXECSPACE_OPENMPTARGET_CPP_TYPE Kokkos::Experimental::OpenMPTarget)
SET(EXECSPACE_OPENMP_CPP_TYPE Kokkos::OpenMP)
SET(EXECSPACE_PTHREAD_CPP_TYPE Kokkos::Threads)
SET(EXECSPACE_SERIAL_CPP_TYPE Kokkos::Serial)

SET(MEM_SPACES
MEMSPACE_CUDASPACE
MEMSPACE_CUDAUVMSPACE
MEMSPACE_HIPSPACE
MEMSPACE_SYCLSPACE
MEMSPACE_SYCLSHAREDSPACE
MEMSPACE_OPENMPTARGET
MEMSPACE_HOSTSPACE
MEMSPACE_HBWSPACE
)
SET(MEMSPACE_CUDASPACE_CPP_TYPE Kokkos::CudaSpace)
SET(MEMSPACE_CUDAUVMSPACE_CPP_TYPE Kokkos::CudaUVMSpace)
SET(MEMSPACE_HIPSPACE_CPP_TYPE Kokkos::Experimental::HIPSpace)
SET(MEMSPACE_SYCLSPACE_CPP_TYPE Kokkos::Experimental::SYCLDeviceUSMSpace)
SET(MEMSPACE_SYCLSHAREDSPACE_CPP_TYPE Kokkos::Experimental::SYCLSharedUSMSpace)
SET(MEMSPACE_HOSTSPACE_CPP_TYPE Kokkos::HostSpace)
SET(MEMSPACE_HBWSPACE_CPP_TYPE Kokkos::HBWSpace)
SET(MEMSPACE_CUDASPACE_CPP_TYPE Kokkos::CudaSpace)
SET(MEMSPACE_CUDAUVMSPACE_CPP_TYPE Kokkos::CudaUVMSpace)
SET(MEMSPACE_HIPSPACE_CPP_TYPE Kokkos::Experimental::HIPSpace)
SET(MEMSPACE_SYCLSPACE_CPP_TYPE Kokkos::Experimental::SYCLDeviceUSMSpace)
SET(MEMSPACE_SYCLSHAREDSPACE_CPP_TYPE Kokkos::Experimental::SYCLSharedUSMSpace)
SET(MEMSPACE_OPENMPTARGETSPACE_CPP_TYPE Kokkos::Experimental::OpenMPTargetSpace)
SET(MEMSPACE_HOSTSPACE_CPP_TYPE Kokkos::HostSpace)
SET(MEMSPACE_HBWSPACE_CPP_TYPE Kokkos::HBWSpace)

IF(KOKKOS_ENABLE_CUDA)
KOKKOSKERNELS_ADD_OPTION(
Expand Down Expand Up @@ -113,9 +117,31 @@ IF(KOKKOS_ENABLE_SYCL)
ENDIF()

IF( Trilinos_ENABLE_COMPLEX_DOUBLE AND ((NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS) OR (NOT CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)) )
MESSAGE( WARNING "The CMake option CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is either undefined or OFF. Please set CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON when building with SYCL and complex double enabled.")
MESSAGE( WARNING "The CMake option CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is either undefined or OFF. Please set CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON when building with SYCL and complex double enabled.")
ENDIF()
ENDIF()

IF(KOKKOS_ENABLE_OPENMPTARGET)
KOKKOSKERNELS_ADD_OPTION(
INST_EXECSPACE_OPENMPTARGET
${KOKKOSKERNELS_INST_EXECSPACE_OPENMPTARGET_DEFAULT}
BOOL
"Whether to pre instantiate kernels for the execution space Kokkos::Experimental::OpenMPTarget. Disabling this when Kokkos_ENABLE_OpenMPTarget is enabled may increase build times. Default: ON if Kokkos is OpenMPTarget-enabled, OFF otherwise."
)
KOKKOSKERNELS_ADD_OPTION(
INST_MEMSPACE_OPENMPTARGETSPACE
${KOKKOSKERNELS_INST_EXECSPACE_OPENMPTARGET_DEFAULT}
BOOL
"Whether to pre instantiate kernels for the memory space Kokkos::Experimental::OpenMPTargetSpace. Disabling this when Kokkos_ENABLE_OPENMPTARGET is enabled may increase build times. Default: ON if Kokkos is OpenMPTarget-enabled, OFF otherwise."
)

IF(KOKKOSKERNELS_INST_EXECSPACE_OPENMPTARGET AND KOKKOSKERNELS_INST_MEMSPACE_OPENMPTARGETSPACE)
LIST(APPEND DEVICE_LIST "<OpenMPTarget,OpenMPTargetSpace>")
ENDIF()

IF( Trilinos_ENABLE_COMPLEX_DOUBLE AND ((NOT DEFINED CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS) OR (NOT CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS)) )
MESSAGE( WARNING "The CMake option CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS is either undefined or OFF. Please set CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS:BOOL=ON when building with OpenMPTarget and complex double enabled.")
ENDIF()
ENDIF()

KOKKOSKERNELS_ADD_OPTION(
Expand Down Expand Up @@ -169,12 +195,13 @@ KOKKOSKERNELS_ADD_OPTION(
"Whether to build kernels for the execution space Kokkos::Serial. If explicit template instantiation (ETI) is enabled in Trilinos, disabling this when Kokkos_ENABLE_SERIAL is enabled may increase build times. Default: ON when Kokkos is Serial-enabled, OFF otherwise."
)

SET(EXECSPACE_CUDA_VALID_MEM_SPACES CUDASPACE CUDAUVMSPACE)
SET(EXECSPACE_HIP_VALID_MEM_SPACES HIPSPACE)
SET(EXECSPACE_SYCL_VALID_MEM_SPACES SYCLSPACE SYCLSHAREDSPACE)
SET(EXECSPACE_SERIAL_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(EXECSPACE_OPENMP_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(EXECSPACE_PTHREAD_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(EXECSPACE_CUDA_VALID_MEM_SPACES CUDASPACE CUDAUVMSPACE)
SET(EXECSPACE_HIP_VALID_MEM_SPACES HIPSPACE)
SET(EXECSPACE_SYCL_VALID_MEM_SPACES SYCLSPACE SYCLSHAREDSPACE)
SET(EXECSPACE_OPENMPTARGET_VALID_MEM_SPACES OPENMPTARGETSPACE)
SET(EXECSPACE_SERIAL_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(EXECSPACE_OPENMP_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(EXECSPACE_PTHREAD_VALID_MEM_SPACES HBWSPACE HOSTSPACE)
SET(DEVICES)
FOREACH(EXEC ${EXEC_SPACES})
IF (KOKKOSKERNELS_INST_${EXEC})
Expand Down
26 changes: 17 additions & 9 deletions perf_test/blas/blas/KokkosBlas_trtri_perf_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ static void __print_trtri_perf_test_options(options_t options) {
template <class scalar_type, class vta, class device_type>
void __do_trtri_serial_blas(options_t options, trtri_args_t trtri_args) {
// Need to take subviews on the device
#if !defined(KOKKOS_ENABLE_CUDA)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -221,7 +223,7 @@ void __do_trtri_serial_blas(options_t options, trtri_args_t trtri_args) {
__trtri_output_csv_row(options, trtri_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA is defined." << std::endl;
<< " disabled since KOKKOS_ENABLE_DEVICE is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA
return;
}
Expand All @@ -230,7 +232,9 @@ template <class uplo, class diag>
void __do_trtri_serial_batched_template(options_t options,
trtri_args_t trtri_args) {
// Need to take subviews on the device
#if !defined(KOKKOS_ENABLE_CUDA)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -259,7 +263,7 @@ void __do_trtri_serial_batched_template(options_t options,
__trtri_output_csv_row(options, trtri_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA is defined." << std::endl;
<< " disabled since KOKKOS_ENABLE_DEVICE is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA
}

Expand Down Expand Up @@ -292,7 +296,9 @@ void __do_trtri_serial_batched(options_t options, trtri_args_t trtri_args) {
return;
}

#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
template <class ExecutionSpace>
struct parallel_blas_trtri {
trtri_args_t trtri_args_;
Expand All @@ -306,11 +312,13 @@ struct parallel_blas_trtri {
KokkosBlas::trtri(&trtri_args_.uplo, &trtri_args_.diag, svA);
}
};
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_HIP
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_HIP && !KOKKOS_ENABLE_OPENMPTARGET

template <class scalar_type, class vta, class device_type>
void __do_trtri_parallel_blas(options_t options, trtri_args_t trtri_args) {
#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -339,9 +347,9 @@ void __do_trtri_parallel_blas(options_t options, trtri_args_t trtri_args) {
__trtri_output_csv_row(options, trtri_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA and/or KOKKOS_ENABLE_HIP is defined." << std::endl;
<< " disabled since KOKKOS_ENABLE_CUDA, KOKKOS_ENABLE_HIP or KOKKOS_ENABLE_OPENMPTARGET is defined." << std::endl;
__trtri_output_csv_row(options, trtri_args, -1);
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_HIP
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_HIP && !defined(KOKKOS_ENABLE_OPENMPTARGET)
return;
}

Expand Down
34 changes: 21 additions & 13 deletions perf_test/blas/blas3/KokkosBlas3_trmm_perf_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ static void __print_trmm_perf_test_options(options_t options) {
template <class scalar_type, class vta, class vtb, class device_type>
void __do_trmm_serial_blas(options_t options, trmm_args_t trmm_args) {
// Need to take subviews on the device
#if !defined(KOKKOS_ENABLE_CUDA)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -249,16 +251,18 @@ void __do_trmm_serial_blas(options_t options, trmm_args_t trmm_args) {
__trmm_output_csv_row(options, trmm_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA
<< " disabled since KOKKOS_ENABLE_CUDA or KOKKOS_ENABLE_OPENMPTARGET is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_OPENMPTARGET
return;
}

template <class side, class uplo, class trans, class diag>
void __do_trmm_serial_batched_template(options_t options,
trmm_args_t trmm_args) {
// Need to take subviews on the device
#if !defined(KOKKOS_ENABLE_CUDA)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -289,8 +293,8 @@ void __do_trmm_serial_batched_template(options_t options,
__trmm_output_csv_row(options, trmm_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA
<< " disabled since KOKKOS_ENABLE_CUDA or KOKKOS_ENABLE_OPENMPTARGET is defined." << std::endl;
#endif // !KOKKOS_ENABLE_CUDA && !KOKKOS_ENABLE_OPENMPTARGET
}

template <class scalar_type, class vta, class vtb, class device_type>
Expand Down Expand Up @@ -390,7 +394,9 @@ void __do_trmm_serial_batched(options_t options, trmm_args_t trmm_args) {
return;
}

#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
template <class ExecutionSpace>
struct parallel_blas_trmm {
trmm_args_t trmm_args_;
Expand All @@ -406,12 +412,14 @@ struct parallel_blas_trmm {
&trmm_args_.diag, trmm_args_.alpha, svA, svB);
}
};
#endif // !KOKKOS_ENABLE_CUDA
#endif // !KOKKOSKERNELS_ENABLE_DEVICE

template <class scalar_type, class vta, class vtb, class device_type>
void __do_trmm_parallel_blas(options_t options, trmm_args_t trmm_args) {
// TODO: Note why this is disabled on CUDA and HIP
#if !defined(KOKKOS_ENABLE_CUDA) && !defined(KOKKOS_ENABLE_HIP)
// TODO: Note why this is disabled on CUDA, OPENMPTARGET and HIP
#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
uint32_t warm_up_n = options.warm_up_n;
uint32_t n = options.n;
Kokkos::Timer timer;
Expand Down Expand Up @@ -442,11 +450,11 @@ void __do_trmm_parallel_blas(options_t options, trmm_args_t trmm_args) {
__trmm_output_csv_row(options, trmm_args, timer.seconds());
#else
std::cerr << std::string(__func__)
<< " disabled since KOKKOS_ENABLE_CUDA and/or KOKKOS_ENABLE_HIP is "
"defined."
<< " disabled since KOKKOS_ENABLE_CUDA, KOKKOS_ENABLE_HIP "
"or KOKKOS_ENABLE_OPENMPTARGET is defined."
<< std::endl;
__trmm_output_csv_row(options, trmm_args, -1);
#endif // !KOKKOS_ENABLE_CUDA
#endif // !KOKKOS_ENABLE_DEVICE
return;
}

Expand Down
28 changes: 15 additions & 13 deletions src/common/KokkosKernels_default_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,47 +49,49 @@
#include <KokkosKernels_config.h> //for all the ETI #cmakedefine macros

#if defined(KOKKOSKERNELS_INST_ORDINAL_INT)
typedef int default_lno_t;
using default_lno_t = int;
#elif defined(KOKKOSKERNELS_INST_ORDINAL_INT64_T)
typedef int64_t default_lno_t;
using default_lno_t = int64_t;
#else
#error "Expect INT and/or INT64_T to be enabled as ORDINAL (lno_t) types"
#endif
//Prefer int as the default offset type, because cuSPARSE doesn't support size_t for rowptrs.
#if defined(KOKKOSKERNELS_INST_OFFSET_INT)
typedef int default_size_type;
using default_size_type = int;
#elif defined(KOKKOSKERNELS_INST_OFFSET_SIZE_T)
typedef size_t default_size_type;
using default_size_type = size_t;
#else
#error "Expect SIZE_T and/or INT to be enabled as OFFSET (size_type) types"
#endif

#if defined(KOKKOSKERNELS_INST_LAYOUTLEFT)
typedef Kokkos::LayoutLeft default_layout;
using default_layout = Kokkos::LayoutLeft;
#elif defined(KOKKOSKERNELS_INST_LAYOUTRIGHT)
typedef Kokkos::LayoutRight default_layout;
using default_layout = Kokkos::LayoutRight;
#else
#error "Expect LAYOUTLEFT and/or LAYOUTRIGHT to be enabled as layout types"
#endif

#if defined(KOKKOSKERNELS_INST_DOUBLE)
typedef double default_scalar;
using default_scalar = double;
#elif defined(KOKKOSKERNELS_INST_FLOAT)
typedef float default_scalar;
using default_scalar = float;
#else
#error "Expect at least one real-valued scalar type (double or float) to be enabled"
#endif

#if defined(KOKKOS_ENABLE_CUDA)
typedef Kokkos::Cuda default_device;
using default_device = Kokkos::Cuda;
#elif defined(KOKKOS_ENABLE_HIP)
typedef Kokkos::Experimental::HIP default_device;
using default_device = Kokkos::Experimental::HIP;
#elif defined(KOKKOS_ENABLE_OPENMPTARGET)
using default_device = Kokkos::Experimental::OpenMPTarget;
#elif defined(KOKKOS_ENABLE_OPENMP)
typedef Kokkos::OpenMP default_device;
using default_device = Kokkos::OpenMP;
#elif defined(KOKKOS_ENABLE_PTHREAD) || defined(KOKKOS_ENABLE_THREADS)
typedef Kokkos::Threads default_device;
using default_device = Kokkos::Threads;
#else
typedef Kokkos::Serial default_device;
using default_device = Kokkos::Serial;
#endif

#endif // KOKKOSKERNELS_DEFAULT_TYPES_H
Loading

0 comments on commit 93b24bd

Please sign in to comment.