Skip to content

Commit

Permalink
Merge pull request #6019 from dalg24/rc_4_0_01_warning_hip_std_memcpy
Browse files Browse the repository at this point in the history
[4.0.01] HIP: Fix warning in some user code when using `std::memcpy`
  • Loading branch information
dalg24 authored Mar 30, 2023
2 parents a556f49 + 1b28263 commit eb93bbd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/HIP/Kokkos_HIP_KernelLaunch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ struct HIPParallelLaunchKernelInvoker<DriverType, LaunchBounds,

// Copy functor (synchronously) to staging buffer in pinned host memory
unsigned long *staging = hip_instance->constantMemHostStaging;
std::memcpy(staging, &driver, sizeof(DriverType));
std::memcpy(static_cast<void *>(staging),
static_cast<const void *>(&driver), sizeof(DriverType));

// Copy functor asynchronously from there to constant memory on the device
KOKKOS_IMPL_HIP_SAFE_CALL(hipMemcpyToSymbolAsync(
Expand Down

0 comments on commit eb93bbd

Please sign in to comment.