Update Kokkos library in LAMMPS to v3.7.2

This commit is contained in:
Stan Gerald Moore
2023-06-05 09:59:38 -06:00
parent 77340921ff
commit a12133ce03
31 changed files with 312 additions and 124 deletions

View File

@ -59,9 +59,11 @@ __global__ void offset(int* p) {
// Test whether allocations survive Kokkos initialize/finalize if done via Raw
// HIP.
TEST(hip, raw_hip_interop) {
// Make sure that we use the same device for all allocations
Kokkos::initialize();
int* p;
KOKKOS_IMPL_HIP_SAFE_CALL(hipMalloc(&p, sizeof(int) * 100));
Kokkos::initialize();
Kokkos::View<int*, Kokkos::MemoryTraits<Kokkos::Unmanaged>> v(p, 100);
Kokkos::deep_copy(v, 5);

View File

@ -50,9 +50,11 @@ namespace Test {
// The difference with the CUDA tests are: raw HIP vs raw CUDA and no launch
// bound in HIP due to an error when computing the block size.
TEST(hip, raw_hip_streams) {
// Make sure that we use the same device for all allocations
Kokkos::initialize();
hipStream_t stream;
KOKKOS_IMPL_HIP_SAFE_CALL(hipStreamCreate(&stream));
Kokkos::initialize();
int* p;
KOKKOS_IMPL_HIP_SAFE_CALL(hipMalloc(&p, sizeof(int) * 100));
using MemorySpace = typename TEST_EXECSPACE::memory_space;