SWDEV-256810 : hipMemcpy2D API handle width, src/dst pitch 0

Change-Id: I4f60b220624f4235c0c3daf68adcd5a496e93696
This commit is contained in:
agodavar
2020-11-02 11:45:03 -05:00
committed by Anusha Godavarthy Surya
parent 4c1f86699d
commit 77e5c4110e
+6
View File
@@ -1511,6 +1511,12 @@ hipError_t ihipMemcpyParam2D(const hip_Memcpy2D* pCopy,
hipError_t ihipMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width,
size_t height, hipMemcpyKind kind, hipStream_t stream, bool isAsync = false) {
hip_Memcpy2D desc = {};
if (spitch == 0 || dpitch == 0) {
return hipErrorUnknown;
}
if (width == 0) {
return hipSuccess;
}
desc.srcXInBytes = 0;
desc.srcY = 0;