Skip to content

Commit

Permalink
Adding functionality to set the device id for HIP memory space
Browse files Browse the repository at this point in the history
  • Loading branch information
anagainaru committed May 4, 2023
1 parent b9a811c commit a17eda2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/adios2/helper/adiosKokkos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ void KokkosInit()
int device_id;
cudaGetDevice(&device_id);
settings.set_device_id(device_id);
#endif
#ifdef ADIOS2_HAVE_KOKKOS_HIP
int device_id;
hipError_t ret;
ret = hipGetDevice(&device_id);
if (ret == hipSuccess)
{
settings.set_device_id(device_id);
}
#endif
Kokkos::initialize(settings);
}
Expand Down

0 comments on commit a17eda2

Please sign in to comment.