SWDEV-461791 make memcpy synchronous for D2D if src&dst ptrs have SYNC_MEMOPS attribute

Change-Id: I603081d21e5eb3c73111845e350d8fa2ba5a7733
This commit is contained in:
Marko Arandjelovic
2024-05-15 15:19:29 +02:00
parent 9b33db9b24
commit 7d0ff387e9
+2 -1
Vedi File
@@ -537,7 +537,8 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin
hipMemoryType dstMemoryType = ((CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_USE_HOST_PTR) &
dstMemory->getMemFlags())? hipMemoryTypeHost : hipMemoryTypeDevice;
// Device to Device copies do not need to host side synchronization.
if ((srcMemoryType == hipMemoryTypeDevice) && (dstMemoryType == hipMemoryTypeDevice)) {
if ((srcMemoryType == hipMemoryTypeDevice) && (dstMemoryType == hipMemoryTypeDevice) &&
(!srcMemory->getUserData().sync_mem_ops_ || !dstMemory->getUserData().sync_mem_ops_)) {
isHostAsync = true;
}
}