From 50910964ea34323a92b27ebcebca445e393e7179 Mon Sep 17 00:00:00 2001 From: Julia Jiang Date: Fri, 18 Sep 2020 13:08:19 -0400 Subject: [PATCH] SWDEV-247518-fix HPC multi gpu test performance drop Change-Id: I2f07d9ba183cf88b3845d8d61607a8a0462d015f [ROCm/hip commit: 9f1a177dc7da492894e770e417b77c0abda81b74] --- projects/hip/rocclr/hip_memory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/hip/rocclr/hip_memory.cpp b/projects/hip/rocclr/hip_memory.cpp index 55732a8ee1..8fd9b05cdb 100755 --- a/projects/hip/rocclr/hip_memory.cpp +++ b/projects/hip/rocclr/hip_memory.cpp @@ -202,14 +202,14 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin } } else { amd::HostQueue* pQueue = &queue; - if (queueDevice != srcMemory->getContext().devices()[0]) { + if ((srcMemory->getContext().devices()[0] == dstMemory->getContext().devices()[0]) && + (queueDevice != srcMemory->getContext().devices()[0])) { pQueue = hip::getNullStream(srcMemory->getContext()); amd::Command* cmd = queue.getLastQueuedCommand(true); if (cmd != nullptr) { waitList.push_back(cmd); } } - command = new amd::CopyMemoryCommand(*pQueue, CL_COMMAND_COPY_BUFFER, waitList, *srcMemory->asBuffer(), *dstMemory->asBuffer(), sOffset, dOffset, sizeBytes); }