Skip to content

Commit

Permalink
fix memcpy_device_to_host (rocm)
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Sep 17, 2023
1 parent b6825bb commit 664f9ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/lib/include/gpu_rocm.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void memcpy_host_to_device(FPTYPE *device, const FPTYPE *host, const int size) {
}

template <typename FPTYPE>
void memcpy_device_to_host(FPTYPE *device, std::vector<FPTYPE> &host) {
void memcpy_device_to_host(const FPTYPE *device, std::vector<FPTYPE> &host) {
DPErrcheck(hipMemcpy(&host[0], device, sizeof(FPTYPE) * host.size(),
hipMemcpyDeviceToHost));
}
Expand Down

0 comments on commit 664f9ea

Please sign in to comment.