SWDEV-461274 - Use GetDeviceById method.

Change-Id: I82a3feb8ecb5f151e09d0dae814b518fb84426e6


[ROCm/clr commit: f682ea7b3b]
Этот коммит содержится в:
Jaydeep Patel
2024-05-13 11:10:24 +00:00
коммит произвёл Maneesh Gupta
родитель 9e13336b47
Коммит af30acd46a
+2 -2
Просмотреть файл
@@ -446,7 +446,7 @@ hipError_t ihipMemcpyCommand(amd::Command*& command, void* dst, const void* src,
} else {
hip::Stream* pStream = &stream;
if ((srcMemory->GetDeviceById() == dstMemory->GetDeviceById()) &&
(queueDevice != srcMemory->getContext().devices()[0])) {
(queueDevice != srcMemory->GetDeviceById())) {
pStream = hip::getNullStream(srcMemory->GetDeviceById()->context());
amd::Command* cmd = stream.getLastQueuedCommand(true);
if (cmd != nullptr) {
@@ -454,7 +454,7 @@ hipError_t ihipMemcpyCommand(amd::Command*& command, void* dst, const void* src,
}
} else if (srcMemory->GetDeviceById() != dstMemory->GetDeviceById()) {
// Scenarios such as DtoH where dst is pinned memory
if ((queueDevice != srcMemory->getContext().devices()[0]) &&
if ((queueDevice != srcMemory->GetDeviceById()) &&
(dstMemory->getContext().devices().size() != 1)) {
pStream = hip::getNullStream(srcMemory->GetDeviceById()->context());
amd::Command* cmd = stream.getLastQueuedCommand(true);