fix: device usm alloc reuse

Do not put into usm reuse if is internal.
Set new isInternalAllocation flag for globals allocations.

Use actual size on device for tracking memory usage.

Related-To: NEO-6893

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2024-05-27 14:15:05 +00:00
committed by Compute-Runtime-Automation
parent 2c2ff5e369
commit 7cb1819b22
6 changed files with 16 additions and 11 deletions

View File

@@ -41,6 +41,7 @@ struct SvmAllocationData {
this->allocId = svmAllocData.allocId;
this->pageSizeForAlignment = svmAllocData.pageSizeForAlignment;
this->isImportedAllocation = svmAllocData.isImportedAllocation;
this->isInternalAllocation = svmAllocData.isInternalAllocation;
for (auto allocation : svmAllocData.gpuAllocations.getGraphicsAllocations()) {
if (allocation) {
this->gpuAllocations.addAllocation(allocation);
@@ -63,6 +64,7 @@ struct SvmAllocationData {
allocId = id;
}
bool mappedAllocData = false;
bool isInternalAllocation = false;
uint32_t getAllocId() const {
return allocId;
@@ -138,7 +140,7 @@ class SVMAllocsManager {
const RootDeviceIndicesContainer &rootDeviceIndices;
const std::map<uint32_t, DeviceBitfield> &subdeviceBitfields;
AllocationType requestedAllocationType = AllocationType::unknown;
bool needZeroedOutAllocation = false;
bool isInternalAllocation = false;
};
struct SvmCacheAllocationInfo {