From 664f9ea2209f9b55fa701769faee8a2ef4f66f4c Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sun, 17 Sep 2023 05:13:48 -0400 Subject: [PATCH] fix memcpy_device_to_host (rocm) Signed-off-by: Jinzhe Zeng --- source/lib/include/gpu_rocm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib/include/gpu_rocm.h b/source/lib/include/gpu_rocm.h index e628d109d7..4c3c1b41a9 100644 --- a/source/lib/include/gpu_rocm.h +++ b/source/lib/include/gpu_rocm.h @@ -59,7 +59,7 @@ void memcpy_host_to_device(FPTYPE *device, const FPTYPE *host, const int size) { } template -void memcpy_device_to_host(FPTYPE *device, std::vector &host) { +void memcpy_device_to_host(const FPTYPE *device, std::vector &host) { DPErrcheck(hipMemcpy(&host[0], device, sizeof(FPTYPE) * host.size(), hipMemcpyDeviceToHost)); }