Update Kokkos library in LAMMPS to v4.3.0
This commit is contained in:
@ -7,7 +7,8 @@ IF (NOT CUDAToolkit_ROOT)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17.0")
|
||||
# FIXME CMake 3.28.4 creates more targets than we export
|
||||
IF(CMAKE_VERSION VERSION_GREATER_EQUAL "3.17.0" AND CMAKE_VERSION VERSION_LESS "3.28.4")
|
||||
find_package(CUDAToolkit)
|
||||
ELSE()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/CudaToolkit.cmake)
|
||||
|
||||
@ -1 +0,0 @@
|
||||
KOKKOS_FIND_IMPORTED(LIBRT HEADER time.h LIBRARY rt)
|
||||
@ -1 +0,0 @@
|
||||
KOKKOS_FIND_IMPORTED(MEMKIND HEADER memkind.h LIBRARY memkind)
|
||||
@ -43,4 +43,7 @@ ELSE()
|
||||
COMPILE_DEFINITIONS PSTL_USE_PARALLEL_POLICIES=0 _GLIBCXX_USE_TBB_PAR_BACKEND=0
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
# Export oneDPL as a Kokkos dependency
|
||||
KOKKOS_EXPORT_CMAKE_TPL(oneDPL)
|
||||
ENDIF()
|
||||
|
||||
15
lib/kokkos/cmake/Modules/FindTPLROCTHRUST.cmake
Normal file
15
lib/kokkos/cmake/Modules/FindTPLROCTHRUST.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
# ROCm 5.6 and earlier set AMDGPU_TARGETS and GPU_TARGETS to all the supported
|
||||
# architectures. Therefore, we end up compiling Kokkos for all the supported
|
||||
# architecture. Starting with ROCm 5.7 AMDGPU_TARGETS and GPU_TARGETS are empty.
|
||||
# It is the user's job to set the variables. Since we are injecting the
|
||||
# architecture flag ourselves, we can let the variables empty. To replicate the
|
||||
# behavior of ROCm 5.7 and later for earlier version of ROCm we set
|
||||
# AMDGPU_TARGETS and GPU_TARGETS to empty and set the values in the cache. If
|
||||
# the values are not cached, FIND_PACKAGE(rocthrust) will overwrite them.
|
||||
SET(AMDGPU_TARGETS "" CACHE STRING "AMD GPU targets to compile for")
|
||||
SET(GPU_TARGETS "" CACHE STRING "GPU targets to compile for")
|
||||
FIND_PACKAGE(rocthrust REQUIRED)
|
||||
KOKKOS_CREATE_IMPORTED_TPL(ROCTHRUST INTERFACE LINK_LIBRARIES roc::rocthrust)
|
||||
|
||||
# Export ROCTHRUST as a Kokkos dependency
|
||||
KOKKOS_EXPORT_CMAKE_TPL(rocthrust)
|
||||
Reference in New Issue
Block a user