Merge pull request #390 from mangupta/hipmemcpy_fix

hipMemcpyAsync returns success when trying to copy 0 bytes

[ROCm/hip commit: 399a17d755]
Этот коммит содержится в:
Maneesh Gupta
2018-04-09 14:02:36 +05:30
коммит произвёл GitHub
родитель 9d80544e28 4077c681c9
Коммит a7f4ee044f
+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;