SWDEV-483586 - Unblock staging H2D transfers
Although unpinned copies require synchronizations
in HIP, runtime can avoid syncs for H2D copies with
a staging buffer
Change-Id: If2203c6bc0cbd89742823688dc8e89e9acd873b2
[ROCm/clr commit: 29cc678d8d]
Этот коммит содержится в:
@@ -599,7 +599,9 @@ hipError_t ihipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKin
|
||||
return hipSuccess;
|
||||
} else if (((srcMemory == nullptr) && (dstMemory != nullptr)) ||
|
||||
((srcMemory != nullptr) && (dstMemory == nullptr))) {
|
||||
isHostAsync = false;
|
||||
// Don't wait for unpinned H2D copy if staging is used for copy
|
||||
isHostAsync &= ((srcMemory == nullptr) && (dstMemory != nullptr) && AMD_DIRECT_DISPATCH &&
|
||||
(sizeBytes <= stream.device().settings().stagedXferSize_)) ? true : false;
|
||||
} else if (srcMemory->GetDeviceById() == dstMemory->GetDeviceById()) {
|
||||
hipMemoryType srcMemoryType = ((CL_MEM_SVM_FINE_GRAIN_BUFFER | CL_MEM_USE_HOST_PTR) &
|
||||
srcMemory->getMemFlags())? hipMemoryTypeHost : hipMemoryTypeDevice;
|
||||
|
||||
Ссылка в новой задаче
Block a user