hipMemcpyAsync returns success when trying to copy 0 bytes

Change-Id: I4c0ee7ccc7563e2df657b50356cdd7fec9a1ef15


[ROCm/clr commit: 445de66560]
这个提交包含在:
Maneesh Gupta
2018-04-09 12:39:44 +05:30
父节点 e2d8f322ec
当前提交 cdb7f8f354
+3 -1
查看文件
@@ -35,8 +35,10 @@ hipError_t memcpyAsync(void* dst, const void* src, size_t sizeBytes, hipMemcpyKi
hipStream_t stream) {
hipError_t e = hipSuccess;
stream = ihipSyncAndResolveStream(stream);
// Return success if number of bytes to copy is 0
if (sizeBytes == 0) return e;
stream = ihipSyncAndResolveStream(stream);
if ((dst == NULL) || (src == NULL)) {
e = hipErrorInvalidValue;