From f64af513a2780c27fbbafa6149f1e9cd511575c4 Mon Sep 17 00:00:00 2001 From: Sarbojit Sarkar Date: Fri, 1 Jan 2021 00:07:16 -0500 Subject: [PATCH] Revert "Fix hipmemset to match CUDA behavior" This reverts commit 9ba5902be4914d9f915b0c17f7b171059234e484. Change-Id: I53052b25bac4956f3efd124eadc936197f2e466a --- hipamd/rocclr/hip_memory.cpp | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/hipamd/rocclr/hip_memory.cpp b/hipamd/rocclr/hip_memory.cpp index c46670dd3f..65e1c1682c 100755 --- a/hipamd/rocclr/hip_memory.cpp +++ b/hipamd/rocclr/hip_memory.cpp @@ -198,24 +198,7 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin if ((srcMemory->getContext().devices()[0] != dstMemory->getContext().devices()[0]) && ((srcMemory->getContext().devices().size() == 1) && (dstMemory->getContext().devices().size() == 1))) { - amd::HostQueue* pQueue = &queue; - - if (queueDevice != dstMemory->getContext().devices()[0]) { - pQueue = hip::getNullStream(dstMemory->getContext()); - amd::Command* cmd = queue.getLastQueuedCommand(true); - if (cmd != nullptr) { - waitList.push_back(cmd); - } - } - - if (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::CopyMemoryP2PCommand(*pQueue, CL_COMMAND_COPY_BUFFER, waitList, + command = new amd::CopyMemoryP2PCommand(queue, CL_COMMAND_COPY_BUFFER, waitList, *srcMemory->asBuffer(), *dstMemory->asBuffer(), sOffset, dOffset, sizeBytes); if (command == nullptr) { return hipErrorOutOfMemory; @@ -1798,11 +1781,6 @@ hipError_t ihipMemset(void* dst, int64_t value, size_t valueSize, size_t sizeByt return hipErrorInvalidValue; } - if (!((CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_USE_HOST_PTR) & - memory->getMemFlags())) { - isAsync = true; - } - hipError_t hip_error = hipSuccess; amd::HostQueue* queue = hip::getQueue(stream);