diff --git a/hipamd/src/hip_memory.cpp b/hipamd/src/hip_memory.cpp index f8bb441a34..90b01f43a3 100644 --- a/hipamd/src/hip_memory.cpp +++ b/hipamd/src/hip_memory.cpp @@ -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; } }