fix: enable 4KB allocation alignment through KMD on Windows

Related-To: NEO-9446
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-11-09 08:40:43 +00:00
committed by Compute-Runtime-Automation
parent 2981c78d34
commit f91757c093
3 changed files with 58 additions and 5 deletions

View File

@@ -1948,10 +1948,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryFill(void *ptr,
size_t patternAllocationSize = alignUp(patternSize, MemoryConstants::cacheLineSize);
auto patternGfxAlloc = device->obtainReusableAllocation(patternAllocationSize, NEO::AllocationType::FILL_PATTERN);
if (patternGfxAlloc == nullptr) {
patternGfxAlloc = device->getDriverHandle()->getMemoryManager()->allocateGraphicsMemoryWithProperties({device->getNEODevice()->getRootDeviceIndex(),
patternAllocationSize,
NEO::AllocationType::FILL_PATTERN,
device->getNEODevice()->getDeviceBitfield()});
NEO::AllocationProperties allocationProperties{device->getNEODevice()->getRootDeviceIndex(),
patternAllocationSize,
NEO::AllocationType::FILL_PATTERN,
device->getNEODevice()->getDeviceBitfield()};
allocationProperties.alignment = MemoryConstants::pageSize;
patternGfxAlloc = device->getDriverHandle()->getMemoryManager()->allocateGraphicsMemoryWithProperties(allocationProperties);
}
void *patternGfxAllocPtr = patternGfxAlloc->getUnderlyingBuffer();
patternAllocations.push_back(patternGfxAlloc);