fix: configure ISA Pool params based on productHelper

When is2MBLocalMemAlignmentEnabled returns true,
increase pool size for builtins from 64k to 2MB.

Additionally, set appropriate alignment for kernel ISA heap allocations.
Additionally, configure isaAllocationPageSize based on productHelper

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwoliński
2025-02-19 17:03:35 +00:00
committed by Compute-Runtime-Automation
parent e815da1e4f
commit bf20ae7ae8
14 changed files with 230 additions and 26 deletions

View File

@@ -1880,11 +1880,10 @@ void fillGmmsInAllocation(GmmHelper *gmmHelper, DrmAllocation *allocation) {
}
}
inline uint64_t getCanonizedHeapAllocationAddress(HeapIndex heap, GmmHelper *gmmHelper, GfxPartition *gfxPartition, size_t &sizeAllocated, bool packed) {
size_t alignment = 0;
if (debugManager.flags.ExperimentalEnableCustomLocalMemoryAlignment.get() != -1) {
alignment = static_cast<size_t>(debugManager.flags.ExperimentalEnableCustomLocalMemoryAlignment.get());
inline uint64_t getCanonizedHeapAllocationAddress(HeapIndex heap, GmmHelper *gmmHelper, GfxPartition *gfxPartition, size_t &sizeAllocated, size_t alignment, bool packed) {
if (const size_t customAlignment = static_cast<size_t>(debugManager.flags.ExperimentalEnableCustomLocalMemoryAlignment.get());
customAlignment > 0) {
alignment = customAlignment;
}
auto address = gfxPartition->heapAllocateWithCustomAlignment(heap, sizeAllocated, alignment);
return gmmHelper->canonize(address);
@@ -1904,10 +1903,15 @@ AllocationStatus getGpuAddress(const AlignmentSelector &alignmentSelector, HeapA
case AllocationType::kernelIsa:
case AllocationType::kernelIsaInternal:
case AllocationType::internalHeap:
case AllocationType::debugModuleArea:
case AllocationType::debugModuleArea: {
size_t alignment = 0;
if (gmmHelper->getRootDeviceEnvironment().getHelper<ProductHelper>().is2MBLocalMemAlignmentEnabled()) {
alignment = MemoryConstants::pageSize2M;
}
gpuAddress = getCanonizedHeapAllocationAddress(heapAssigner.get32BitHeapIndex(allocType, true, hwInfo, allocationData.flags.use32BitFrontWindow),
gmmHelper, gfxPartition, sizeAllocated, false);
gmmHelper, gfxPartition, sizeAllocated, alignment, false);
break;
}
case AllocationType::writeCombined:
sizeAllocated = 0;
break;