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

Change-Id: I603081d21e5eb3c73111845e350d8fa2ba5a7733
这个提交包含在:
Marko Arandjelovic 于 2024-07-30 11:46:55 -04:00 提交
1 父节点 9b33db9b24
当前提交 7d0ff387e9
1 个文件已更改
+2 -1
+2 -1
查看文件
@@ -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;
}
}