SWDEV-243576 - Fix hipMemcpy regression.
If the queue device doesn't match the device on any memory object, use the queue device from the memory object.
Change-Id: I5fdcf00494f8391574f4443332c01788b8da44ef
[ROCm/clr commit: e430506f70]
Этот коммит содержится в:
коммит произвёл
Subodh Gupta
родитель
380e2fe752
Коммит
aa179b01a3
@@ -196,7 +196,16 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin
|
||||
return hipErrorInvalidValue;
|
||||
}
|
||||
} else {
|
||||
command = new amd::CopyMemoryCommand(queue, CL_COMMAND_COPY_BUFFER, waitList,
|
||||
amd::HostQueue* pQueue = &queue;
|
||||
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::CopyMemoryCommand(*pQueue, CL_COMMAND_COPY_BUFFER, waitList,
|
||||
*srcMemory->asBuffer(), *dstMemory->asBuffer(), sOffset, dOffset, sizeBytes);
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user