mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 01:35:20 +08:00
fix: enable single temporary allocations list mode
Related-To: NEO-14641 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a2c41e4749
commit
b496274d1a
@@ -92,7 +92,7 @@ MemoryManager::MemoryManager(ExecutionEnvironment &executionEnvironment) : execu
|
||||
supportsMultiStorageResources = !!debugManager.flags.EnableMultiStorageResources.get();
|
||||
}
|
||||
|
||||
if (debugManager.flags.UseSingleListForTemporaryAllocations.get() == 1) {
|
||||
if (debugManager.flags.UseSingleListForTemporaryAllocations.get() != 0) {
|
||||
singleTemporaryAllocationsList = true;
|
||||
temporaryAllocations = std::make_unique<AllocationsList>(AllocationUsage::TEMPORARY_ALLOCATION);
|
||||
}
|
||||
@@ -115,14 +115,16 @@ void MemoryManager::cleanTemporaryAllocations(const CommandStreamReceiver &csr,
|
||||
auto *nextAlloc = currentAlloc->next;
|
||||
bool freeAllocation = false;
|
||||
|
||||
if (currentAlloc->isUsedByOsContext(waitedOsContextId)) {
|
||||
if (currentAlloc->hostPtrTaskCountAssignment == 0 && currentAlloc->getTaskCount(waitedOsContextId) <= waitedTaskCount) {
|
||||
if (!currentAlloc->isUsedByManyOsContexts() || !allocInUse(*currentAlloc)) {
|
||||
freeAllocation = true;
|
||||
if (currentAlloc->hostPtrTaskCountAssignment == 0) {
|
||||
if (currentAlloc->isUsedByOsContext(waitedOsContextId)) {
|
||||
if (currentAlloc->getTaskCount(waitedOsContextId) <= waitedTaskCount) {
|
||||
if (!currentAlloc->isUsedByManyOsContexts() || !allocInUse(*currentAlloc)) {
|
||||
freeAllocation = true;
|
||||
}
|
||||
}
|
||||
} else if (!allocInUse(*currentAlloc)) {
|
||||
freeAllocation = true;
|
||||
}
|
||||
} else if (!allocInUse(*currentAlloc)) {
|
||||
freeAllocation = true;
|
||||
}
|
||||
|
||||
if (freeAllocation) {
|
||||
|
||||
Reference in New Issue
Block a user