Added async memcpy driver api for nvcc backend
Change-Id: If401fc949b834c883cff9de74adb0d532a0fd942
[ROCm/hip commit: 1cb90bdd6a]
Tento commit je obsažen v:
@@ -232,6 +232,24 @@ inline static hipError_t hipMemcpyDtoD(hipDeviceptr_t dst,
|
|||||||
return hipCUResultTohipError(cuMemcpyDtoD(dst, src, size));
|
return hipCUResultTohipError(cuMemcpyDtoD(dst, src, size));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline static hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst,
|
||||||
|
void* src, size_t size, hipStream_t stream)
|
||||||
|
{
|
||||||
|
return hipCUResultTohipError(cuMemcpyHtoDAsync(dst, src, size, stream));
|
||||||
|
}
|
||||||
|
|
||||||
|
inline static hipError_t hipMemcpyDtoHAsync(void* dst,
|
||||||
|
hipDeviceptr_t src, size_t size, hipStream_t stream)
|
||||||
|
{
|
||||||
|
return hipCUResultTohipError(cuMemcpyDtoH(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, stream));
|
||||||
|
}
|
||||||
|
|
||||||
inline static hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind copyKind) {
|
inline static hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind copyKind) {
|
||||||
return hipCUDAErrorTohipError(cudaMemcpy(dst, src, sizeBytes, hipMemcpyKindToCudaMemcpyKind(copyKind)));
|
return hipCUDAErrorTohipError(cudaMemcpy(dst, src, sizeBytes, hipMemcpyKindToCudaMemcpyKind(copyKind)));
|
||||||
}
|
}
|
||||||
|
|||||||
Odkázat v novém úkolu
Zablokovat Uživatele