mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 16:24:18 +08:00
performance: do not free deferred allocations when not needed
Level Zero doesn't use deferred allocations so no point in paying the price to check for them in cleanAllocationList. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
39cf653959
commit
80e3632c41
@@ -121,6 +121,7 @@ CommandStreamReceiver::~CommandStreamReceiver() {
|
||||
|
||||
internalAllocationStorage->cleanAllocationList(-1, REUSABLE_ALLOCATION);
|
||||
internalAllocationStorage->cleanAllocationList(-1, TEMPORARY_ALLOCATION);
|
||||
internalAllocationStorage->cleanAllocationList(-1, DEFERRED_DEALLOCATION);
|
||||
getMemoryManager()->unregisterEngineForCsr(this);
|
||||
}
|
||||
|
||||
@@ -221,6 +222,9 @@ WaitStatus CommandStreamReceiver::waitForTaskCountAndCleanAllocationList(TaskCou
|
||||
waitStatus = this->CommandStreamReceiver::waitForTaskCount(requiredTaskCount);
|
||||
}
|
||||
internalAllocationStorage->cleanAllocationList(requiredTaskCount, allocationUsage);
|
||||
if (allocationUsage == TEMPORARY_ALLOCATION) {
|
||||
internalAllocationStorage->cleanAllocationList(requiredTaskCount, DEFERRED_DEALLOCATION);
|
||||
}
|
||||
|
||||
return waitStatus;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user