mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
fix: disable locked ptr memcpy for imported BOs
Related-To: GSD-6300 Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1054d166e2
commit
e996241063
@@ -947,6 +947,11 @@ bool CommandListCoreFamilyImmediate<gfxCoreFamily>::preferCopyThroughLockedPtr(C
|
||||
return false;
|
||||
}
|
||||
|
||||
if (((cpuMemCopyInfo.srcAllocData != nullptr) && (cpuMemCopyInfo.srcAllocData->isImportedAllocation)) ||
|
||||
((cpuMemCopyInfo.dstAllocData != nullptr) && (cpuMemCopyInfo.dstAllocData->isImportedAllocation))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const TransferType transferType = getTransferType(cpuMemCopyInfo.dstAllocData, cpuMemCopyInfo.srcAllocData);
|
||||
const size_t transferThreshold = getTransferThreshold(transferType);
|
||||
|
||||
|
||||
@@ -676,6 +676,7 @@ void *DriverHandleImp::importFdHandles(NEO::Device *neoDevice, ze_ipc_memory_fla
|
||||
allocDataTmp->size = alloc->getUnderlyingBufferSize();
|
||||
allocDataTmp->memoryType = InternalMemoryType::DEVICE_UNIFIED_MEMORY;
|
||||
allocDataTmp->device = neoDevice;
|
||||
allocDataTmp->isImportedAllocation = true;
|
||||
allocDataTmp->setAllocId(this->getSvmAllocsManager()->allocationsCounter++);
|
||||
|
||||
if (flags & ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED) {
|
||||
@@ -847,6 +848,7 @@ void *DriverHandleImp::importNTHandle(ze_device_handle_t hDevice, void *handle,
|
||||
allocData.memoryType =
|
||||
isHostIpcAllocation ? InternalMemoryType::HOST_UNIFIED_MEMORY : InternalMemoryType::DEVICE_UNIFIED_MEMORY;
|
||||
allocData.device = neoDevice;
|
||||
allocData.isImportedAllocation = true;
|
||||
allocData.setAllocId(this->getSvmAllocsManager()->allocationsCounter++);
|
||||
|
||||
this->getSvmAllocsManager()->insertSVMAlloc(allocData);
|
||||
|
||||
Reference in New Issue
Block a user