SWDEV-256325 : Fix for hipMemset2D crash

Change-Id: I1f434602fecd4fb935d2bc72f2c72d6a2d4c45fe


[ROCm/hip commit: 0af33580e6]
This commit is contained in:
Sarbojit Sarkar
2020-10-15 04:26:03 -04:00
committed by Sarbojit Sarkar
parent 03001805c3
commit 4824fca235
+4
View File
@@ -1855,6 +1855,10 @@ hipError_t ihipMemset3D(hipPitchedPtr pitchedDevPtr,
auto sizeBytes = extent.width * extent.height * extent.depth;
if (sizeBytes == 0) {
// sizeBytes is zero hence returning early as nothing to be set
return hipSuccess;
}
if (memory == nullptr) {
return hipErrorInvalidValue;
}