From e0efc8a09e75ab2f60de3edd98584b11bf2e42ff Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Wed, 26 Sep 2018 12:47:36 +0530 Subject: [PATCH] Return hipSuccess when sizeBytes=0 in hipMemset [ROCm/clr commit: bd27310127f15d4d2aede1f3c0ae998e16e527fb] --- projects/clr/hipamd/src/hip_memory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/clr/hipamd/src/hip_memory.cpp b/projects/clr/hipamd/src/hip_memory.cpp index dc5390f014..bda6ad2650 100644 --- a/projects/clr/hipamd/src/hip_memory.cpp +++ b/projects/clr/hipamd/src/hip_memory.cpp @@ -1543,6 +1543,8 @@ hipError_t ihipMemset(void* dst, int value, size_t sizeBytes, hipStream_t strea { hipError_t e = hipSuccess; + if (sizeBytes == 0) return e; + if (stream && (dst != NULL)) { if(copyDataType == ihipMemsetDataTypeChar){ if ((sizeBytes & 0x3) == 0) {