performance: Use 2MB heap for cl_buffers if possible

Related-To: NEO-16165

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2025-10-09 16:23:38 +00:00
committed by Compute-Runtime-Automation
parent 6515e422e9
commit 435c43d142
13 changed files with 40 additions and 57 deletions

View File

@@ -448,7 +448,7 @@ void *SVMAllocsManager::createHostUnifiedMemoryAllocation(size_t size,
unifiedMemoryProperties.flags.preferCompressed = compressionEnabled;
unifiedMemoryProperties.flags.shareable = memoryProperties.allocationFlags.flags.shareable;
unifiedMemoryProperties.flags.isUSMHostAllocation = true;
unifiedMemoryProperties.flags.isUSMDeviceAllocation = false;
unifiedMemoryProperties.flags.isHostInaccessibleAllocation = false;
unifiedMemoryProperties.cacheRegion = MemoryPropertiesHelper::getCacheRegion(memoryProperties.allocationFlags);
if (this->usmHostAllocationsCache) {
@@ -509,7 +509,7 @@ void *SVMAllocsManager::createUnifiedMemoryAllocation(size_t size,
multiStorageAllocation,
deviceBitfield};
unifiedMemoryProperties.alignment = alignUpNonZero<size_t>(memoryProperties.alignment, pageSizeForAlignment);
unifiedMemoryProperties.flags.isUSMDeviceAllocation = false;
unifiedMemoryProperties.flags.isHostInaccessibleAllocation = false;
unifiedMemoryProperties.flags.shareable = memoryProperties.allocationFlags.flags.shareable;
unifiedMemoryProperties.flags.shareableWithoutNTHandle = memoryProperties.allocationFlags.flags.shareableWithoutNTHandle;
unifiedMemoryProperties.cacheRegion = MemoryPropertiesHelper::getCacheRegion(memoryProperties.allocationFlags);
@@ -519,7 +519,7 @@ void *SVMAllocsManager::createUnifiedMemoryAllocation(size_t size,
unifiedMemoryProperties.flags.resource48Bit = memoryProperties.allocationFlags.flags.resource48Bit;
if (memoryProperties.memoryType == InternalMemoryType::deviceUnifiedMemory) {
unifiedMemoryProperties.flags.isUSMDeviceAllocation = true;
unifiedMemoryProperties.flags.isHostInaccessibleAllocation = true;
if (this->usmDeviceAllocationsCache &&
false == memoryProperties.isInternalAllocation) {
void *allocationFromCache = this->usmDeviceAllocationsCache->get(size, memoryProperties);