From b8fbb0ea236db92edf21e52a24d524e45f2bf040 Mon Sep 17 00:00:00 2001 From: Evgeny Mankov Date: Wed, 1 Mar 2017 23:04:34 +0300 Subject: [PATCH] [HIP] [FIX] Memcpy Async functions on nvcc path. + in hipMemcpyDtoDAsync: cuMemcpyDtoD -> cuMemcpyDtoDAsync + in hipMemcpyDtoHAsync: cuMemcpyDtoH -> cuMemcpyDtoHAsync P.S. "The types CUstream and cudaStream_t are identical and may be used interchangeably", thus explicit c-like type cast is not needed, aka CUstream(stream). [ROCm/hip commit: 6421a1e79eab4629959bcb5bf0f7fb2294968047] --- projects/hip/include/hip/nvcc_detail/hip_runtime_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h index d2875303da..dc51290167 100644 --- a/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h +++ b/projects/hip/include/hip/nvcc_detail/hip_runtime_api.h @@ -306,13 +306,13 @@ inline static hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, inline static hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t size, hipStream_t stream) { - return hipCUResultTohipError(cuMemcpyDtoH(dst, src, size)); + return hipCUResultTohipError(cuMemcpyDtoHAsync(dst, src, size, stream)); } inline static hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src, size_t size, hipStream_t stream) { - return hipCUResultTohipError(cuMemcpyDtoD(dst, src, size)); + return hipCUResultTohipError(cuMemcpyDtoDAsync(dst, src, size, stream)); } inline static hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind copyKind) {