feature: support L2 cache reservation

Related-To: NEO-12837
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2025-02-25 16:08:04 +00:00
committed by Compute-Runtime-Automation
parent 117f4c8d32
commit a7c46b8213
19 changed files with 539 additions and 178 deletions

View File

@@ -166,7 +166,10 @@ bool DrmAllocation::setCacheRegion(Drm *drm, CacheRegion regionIndex) {
return false;
}
auto regionSize = (cacheInfo->getMaxReservationNumCacheRegions() > 0) ? cacheInfo->getMaxReservationCacheSize() / cacheInfo->getMaxReservationNumCacheRegions() : 0;
const auto cacheLevel{cacheInfo->getLevelForRegion(regionIndex)};
const auto maxCacheRegions{cacheInfo->getMaxReservationNumCacheRegions(cacheLevel)};
const auto maxReservationCacheSize{cacheInfo->getMaxReservationCacheSize(cacheLevel)};
const auto regionSize{(maxCacheRegions > 0) ? maxReservationCacheSize / maxCacheRegions : 0};
if (regionSize == 0) {
return false;
}