From f2464edb74f5ff14fa3757ce946767509f207adc Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Tue, 30 Jun 2020 12:59:54 -0400 Subject: [PATCH] Remove hipMemcpyDeviceToDevice check. There is hipMemcpyDefault that requires validation also. Change-Id: I5ae0ffa1c023b7774547acbdc049b84a0c2cb4c5 [ROCm/clr commit: 11b7842f712bc44bff93b35305637aecedda6a4f] --- projects/clr/hipamd/rocclr/hip_memory.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/clr/hipamd/rocclr/hip_memory.cpp b/projects/clr/hipamd/rocclr/hip_memory.cpp index 826183a59a..dd269ba4b8 100755 --- a/projects/clr/hipamd/rocclr/hip_memory.cpp +++ b/projects/clr/hipamd/rocclr/hip_memory.cpp @@ -178,10 +178,9 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin *srcMemory->asBuffer(), sOffset, sizeBytes, dst); isAsync = false; } else if ((srcMemory != nullptr) && (dstMemory != nullptr)) { - if ((kind == hipMemcpyDeviceToDevice) && - // Check if the queue device doesn't match the device on any memory object. Hence - // it's a P2P transfer, because the app has requested access to another GPU - (srcMemory->getContext().devices()[0] != dstMemory->getContext().devices()[0])) { + // Check if the queue device doesn't match the device on any memory object. Hence + // it's a P2P transfer, because the app has requested access to another GPU + if (srcMemory->getContext().devices()[0] != dstMemory->getContext().devices()[0]) { command = new amd::CopyMemoryP2PCommand(queue, CL_COMMAND_COPY_BUFFER, waitList, *srcMemory->asBuffer(), *dstMemory->asBuffer(), sOffset, dOffset, sizeBytes); if (command == nullptr) {