fix: pass custom alignments for WSL2 device and shared memory allocation

Related-To: NEO-8431

Signed-off-by: Wenbin Lu <wenbin.lu@intel.com>
This commit is contained in:
Wenbin Lu
2024-05-17 01:12:14 +00:00
committed by Compute-Runtime-Automation
parent 6c75ec3116
commit 1c98420518
4 changed files with 60 additions and 3 deletions

View File

@@ -734,7 +734,7 @@ GraphicsAllocation *MemoryManager::allocateGraphicsMemory(const AllocationData &
if (allocationData.gpuAddress) {
return allocateGraphicsMemoryWithGpuVa(allocationData);
}
if (peek64kbPagesEnabled(allocationData.rootDeviceIndex) && allocationData.flags.allow64kbPages) {
if (peek64kbPagesEnabled(allocationData.rootDeviceIndex) && allocationData.flags.allow64kbPages && (allocationData.alignment <= MemoryConstants::pageSize64k)) {
return allocateGraphicsMemory64kb(allocationData);
}
return allocateGraphicsMemoryWithAlignment(allocationData);