[5/n] Optimize Indirect Allocations.

Enable mechanism where feasible.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2022-01-26 15:25:06 +00:00
committed by Compute-Runtime-Automation
parent f17dfc9a5c
commit 3d9548cee9
3 changed files with 74 additions and 1 deletions

View File

@@ -171,7 +171,12 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
bool indirectAllocationsAllowed = commandList->hasIndirectAllocationsAllowed();
if (indirectAllocationsAllowed) {
auto svmAllocsManager = device->getDriverHandle()->getSvmAllocsManager();
if (NEO::DebugManager.flags.MakeIndirectAllocationsResidentAsPack.get() == 1) {
auto submitAsPack = device->getDriverHandle()->getMemoryManager()->allowIndirectAllocationsAsPack(neoDevice->getRootDeviceIndex());
if (NEO::DebugManager.flags.MakeIndirectAllocationsResidentAsPack.get() != -1) {
submitAsPack = !!NEO::DebugManager.flags.MakeIndirectAllocationsResidentAsPack.get();
}
if (submitAsPack) {
svmAllocsManager->makeIndirectAllocationsResident(*csr, csr->peekTaskCount() + 1u);
} else {
UnifiedMemoryControls unifiedMemoryControls = commandList->getUnifiedMemoryControls();