XeHPC Implicit scaling: put command/ring/semaphore buffer to first memory bank

In direct submission scenario command/ring/semaphore buffer allocations
are placed in the same memory bank to ensure that their memory is updated in
correct order

Related-To: NEO-6698
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2022-03-16 18:41:29 +00:00
committed by Compute-Runtime-Automation
parent aa7ba69746
commit 3792481d33
7 changed files with 337 additions and 5 deletions

View File

@@ -153,6 +153,34 @@ StorageInfo MemoryManager::createStorageInfoFromProperties(const AllocationPrope
default:
break;
}
bool forceLocalMemoryForDirectSubmission = properties.flags.multiOsContextCapable;
switch (DebugManager.flags.DirectSubmissionForceLocalMemoryStorageMode.get()) {
case 0:
forceLocalMemoryForDirectSubmission = false;
break;
case 2:
forceLocalMemoryForDirectSubmission = true;
break;
default:
break;
}
if (forceLocalMemoryForDirectSubmission) {
if (properties.allocationType == AllocationType::COMMAND_BUFFER ||
properties.allocationType == AllocationType::RING_BUFFER ||
properties.allocationType == AllocationType::SEMAPHORE_BUFFER) {
storageInfo.memoryBanks = {};
for (auto bank = 0u; bank < deviceCount; bank++) {
if (allTilesValue.test(bank)) {
storageInfo.memoryBanks.set(bank);
break;
}
}
UNRECOVERABLE_IF(storageInfo.memoryBanks.none());
}
}
return storageInfo;
}
uint32_t StorageInfo::getNumBanks() const {