CacheSettingsHelper - timestamp allocations

Related-To: NEO-6664

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2022-02-09 18:03:05 +00:00
committed by Compute-Runtime-Automation
parent c672930f16
commit 71f48c89c8
9 changed files with 78 additions and 33 deletions

View File

@@ -111,7 +111,7 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemoryWithAlignment
allocationData.hostPtr,
sizeAligned,
alignment,
CacheSettingsHelper::getGmmUsageType(memoryAllocation->getAllocationType(), !!allocationData.flags.uncacheable),
CacheSettingsHelper::getGmmUsageType(memoryAllocation->getAllocationType(), !!allocationData.flags.uncacheable, *pHwInfo),
true,
allocationData.storageInfo,
true);
@@ -162,7 +162,7 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemory64kb(const Al
allocationData.hostPtr,
allocationDataAlign.size,
allocationDataAlign.alignment,
CacheSettingsHelper::getGmmUsageType(memoryAllocation->getAllocationType(), !!allocationData.flags.uncacheable),
CacheSettingsHelper::getGmmUsageType(memoryAllocation->getAllocationType(), !!allocationData.flags.uncacheable, *hwInfo),
allocationData.flags.preferCompressed,
allocationData.storageInfo, true);
memoryAllocation->setDefaultGmm(gmm.release());
@@ -348,8 +348,10 @@ void OsAgnosticMemoryManager::cleanOsHandles(OsHandleStorage &handleStorage, uin
}
GraphicsAllocation *OsAgnosticMemoryManager::allocateMemoryByKMD(const AllocationData &allocationData) {
auto hwInfo = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getHardwareInfo();
auto gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmClientContext(), allocationData.hostPtr,
allocationData.size, 0u, CacheSettingsHelper::getGmmUsageType(allocationData.type, allocationData.flags.uncacheable),
allocationData.size, 0u, CacheSettingsHelper::getGmmUsageType(allocationData.type, allocationData.flags.uncacheable, *hwInfo),
allocationData.flags.preferCompressed, allocationData.storageInfo, true);
GraphicsAllocation *alloc = nullptr;
@@ -478,11 +480,12 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocateGraphicsMemoryInDevicePool(
sizeAligned64k = alignUp(allocationData.size, MemoryConstants::pageSize64k);
if (DebugManager.flags.RenderCompressedBuffersEnabled.get() &&
allocationData.flags.preferCompressed) {
auto hwInfo = executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getHardwareInfo();
gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmClientContext(),
allocationData.hostPtr,
sizeAligned64k,
MemoryConstants::pageSize64k,
CacheSettingsHelper::getGmmUsageType(allocationData.type, allocationData.flags.uncacheable),
CacheSettingsHelper::getGmmUsageType(allocationData.type, allocationData.flags.uncacheable, *hwInfo),
true,
allocationData.storageInfo,
true);