SWDEV-408687 - Prevent updating dstXInBytes/srcXInBytes twice
Update pCopy->srcMemoryType and pCopy->dstMemoryType so that ihipGetMemcpyParam3DCommand() won't redetect memory type. This will prevent dstXInBytes and srcXInBytes getting updated twice with offset in hipMemoryTypeUnified type. Change-Id: Ief4ea81941e25d22bcafd213b3b84a65eb23cf94
이 커밋은 다음에 포함됨:
@@ -2200,6 +2200,8 @@ hipError_t ihipMemcpyParam3D(const HIP_MEMCPY3D* pCopy, hipStream_t stream, bool
|
||||
// {src/dst}Host may be unitialized. Copy over {src/dst}Device into it if we detect system memory.
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->srcHost = pCopy->srcDevice;
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->srcXInBytes += offset;
|
||||
// We don't need detect memory type again for hipMemoryTypeUnified
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->srcMemoryType = srcMemoryType;
|
||||
}
|
||||
}
|
||||
offset = 0;
|
||||
@@ -2216,6 +2218,8 @@ hipError_t ihipMemcpyParam3D(const HIP_MEMCPY3D* pCopy, hipStream_t stream, bool
|
||||
if (dstMemoryType == hipMemoryTypeHost) {
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->dstHost = pCopy->dstDevice;
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->dstXInBytes += offset;
|
||||
// We don't need detect memory type again for hipMemoryTypeUnified
|
||||
const_cast<HIP_MEMCPY3D*>(pCopy)->dstMemoryType = dstMemoryType;
|
||||
}
|
||||
}
|
||||
// If {src/dst}MemoryType is hipMemoryTypeHost, check if the memory was prepinned.
|
||||
|
||||
새 이슈에서 참조
사용자 차단