fix: set gmm LocalOnly flag regardless of extraMemoryFlags

Related-To: NEO-13428
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2025-05-29 19:28:44 +00:00
committed by Compute-Runtime-Automation
parent f1f3ee13db
commit d667614a4f
7 changed files with 51 additions and 9 deletions

View File

@@ -60,10 +60,15 @@ WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment)
deferredDeleter = createDeferredDeleter();
mallocRestrictions.minAddress = 0u;
usmDeviceAllocationMode = toLocalMemAllocationMode(debugManager.flags.NEO_LOCAL_MEMORY_ALLOCATION_MODE.get());
for (uint32_t rootDeviceIndex = 0; rootDeviceIndex < gfxPartitions.size(); ++rootDeviceIndex) {
mallocRestrictions.minAddress = std::max(mallocRestrictions.minAddress, getWddm(rootDeviceIndex).getWddmMinAddress());
getWddm(rootDeviceIndex).initGfxPartition(*getGfxPartition(rootDeviceIndex), rootDeviceIndex, gfxPartitions.size(), heapAssigners[rootDeviceIndex]->apiAllowExternalHeapForSshAndDsh);
isLocalMemoryUsedForIsa(rootDeviceIndex);
if (isLocalOnlyAllocationMode()) {
getGmmHelper(rootDeviceIndex)->setLocalOnlyAllocationMode(true);
}
}
alignmentSelector.addCandidateAlignment(MemoryConstants::pageSize64k, true, AlignmentSelector::anyWastage);
@@ -76,7 +81,6 @@ WddmMemoryManager::WddmMemoryManager(ExecutionEnvironment &executionEnvironment)
alignmentSelector.addCandidateAlignment(customAlignment, false, AlignmentSelector::anyWastage);
}
osMemory = OSMemory::create();
usmDeviceAllocationMode = toLocalMemAllocationMode(debugManager.flags.NEO_LOCAL_MEMORY_ALLOCATION_MODE.get());
initialized = true;
}