performance: Allocate by KMD on BMG

Related-To: NEO-10526

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2024-12-04 12:51:24 +00:00
committed by Compute-Runtime-Automation
parent 1252b10ba9
commit d40a804bca
4 changed files with 30 additions and 2 deletions

View File

@@ -199,7 +199,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(const Allocati
}
GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToCpuVA(const AllocationData &allocationData, bool allowLargePages) {
if (allocationData.alignment != MemoryConstants::pageSize64k) {
if (allocationData.alignment < MemoryConstants::pageSize64k) {
allowLargePages = false;
}
@@ -271,7 +271,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemoryUsingKmdAndMapItToC
if (alignGpuAddressTo64KB) {
void *tempCPUPtr = cpuPtr;
cpuPtr = alignUp(cpuPtr, MemoryConstants::pageSize64k);
cpuPtr = alignUp(cpuPtr, std::max(allocationData.alignment, MemoryConstants::pageSize64k));
wddmAllocation->setGpuAddress(wddmAllocation->getGpuAddress() + ptrDiff(cpuPtr, tempCPUPtr));
}
}