SWDEV-364236 - Fix layered Image issue

Fix wrong logic to get layer index;
Make layered image's layout match cuda spec;
Fix wrong comparision of element size.
Remove amd::BufferRect from ihipMemcpyAtoHCommand()
and ihipMemcpyHtoACommand().
Change-Id: Icc6a4233fbce2e9b2dc6feb79e6bfbd761684c7d


[ROCm/clr commit: 5a0085e516]
Esse commit está contido em:
taosang2 authored and Tao Sang committed 2023-10-19 16:06:20 -04:00
1 pai 648bfdc5cd
commit 28524520e6
5 files changed
+73 -28

No files matched your search

+4 -5
Ver Arquivo
@@ -201,22 +201,21 @@ hipError_t GraphMemcpyNode::ValidateParams(const hipMemcpy3DParms* pNodeParams)
}
} else if ((srcMemoryType == hipMemoryTypeHost) && (dstMemoryType == hipMemoryTypeArray)) {
amd::Image* dstImage;
amd::BufferRect srcRect;
size_t start = 0;
status =
ihipMemcpyHtoAValidate(pCopy.srcHost, pCopy.dstArray, srcOrigin, dstOrigin, copyRegion,
pCopy.srcPitch, pCopy.srcPitch * pCopy.srcHeight, dstImage, srcRect);
pCopy.srcPitch, pCopy.srcPitch * pCopy.srcHeight, dstImage, start);
if (status != hipSuccess) {
return status;
}
} else if ((srcMemoryType == hipMemoryTypeArray) && (dstMemoryType == hipMemoryTypeHost)) {
// Image to Host.
amd::Image* srcImage;
amd::BufferRect dstRect;
size_t start = 0;
status =
ihipMemcpyAtoHValidate(pCopy.srcArray, pCopy.dstHost, srcOrigin, dstOrigin, copyRegion,
pCopy.dstPitch, pCopy.dstPitch * pCopy.dstHeight, srcImage, dstRect);
pCopy.dstPitch, pCopy.dstPitch * pCopy.dstHeight, srcImage, start);
if (status != hipSuccess) {
return status;
}