fix: Add alignment support to createUnifiedMemoryAllocation

Allows the user to use alignments > 64KB in `createUnifiedMemoryAllocation`

So that the restriction in `piextUSMDeviceAlloc` of the DPC++ runtime
could be lifted

Related-To: LOCI-4168

Signed-off-by: Lu, Wenbin <wenbin.lu@intel.com>
This commit is contained in:
Lu, Wenbin
2023-03-31 14:23:21 +00:00
committed by Compute-Runtime-Automation
parent 74205f3f37
commit 5d653c8536
24 changed files with 164 additions and 101 deletions

View File

@@ -3872,7 +3872,7 @@ CL_API_ENTRY void *CL_API_CALL clHostMemAllocINTEL(
return nullptr;
}
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY,
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::HOST_UNIFIED_MEMORY, alignment,
neoContext->getRootDeviceIndices(), neoContext->getDeviceBitfields());
cl_mem_flags flags = 0;
cl_mem_flags_intel flagsIntel = 0;
@@ -3917,7 +3917,7 @@ CL_API_ENTRY void *CL_API_CALL clDeviceMemAllocINTEL(
auto subDeviceBitfields = neoContext->getDeviceBitfields();
subDeviceBitfields[neoDevice->getRootDeviceIndex()] = neoDevice->getDeviceBitfield();
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY,
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::DEVICE_UNIFIED_MEMORY, alignment,
neoContext->getRootDeviceIndices(), subDeviceBitfields);
cl_mem_flags flags = 0;
cl_mem_flags_intel flagsIntel = 0;
@@ -3977,7 +3977,7 @@ CL_API_ENTRY void *CL_API_CALL clSharedMemAllocINTEL(
} else {
neoDevice = neoContext->getDevice(0);
}
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::SHARED_UNIFIED_MEMORY, neoContext->getRootDeviceIndices(), subDeviceBitfields);
SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::SHARED_UNIFIED_MEMORY, alignment, neoContext->getRootDeviceIndices(), subDeviceBitfields);
unifiedMemoryProperties.device = unifiedMemoryPropertiesDevice;
if (!ClMemoryPropertiesHelper::parseMemoryProperties(properties, unifiedMemoryProperties.allocationFlags, flags, flagsIntel,
allocflags, ClMemoryPropertiesHelper::ObjType::UNKNOWN,