feature: Add debug keys for chunking allocation and size

Related-to: NEO-7695

New debug keys added:

EnableBOChunking is now a mask
0 = no chunking (default).
1 = shared allocations only
2 = device allocations only
3 = shared and device allocations

MinimalAllocationSizeForChunking sets the minimum allocation
size to apply chunking. Default is 2MB.

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2023-07-05 21:41:17 +00:00
committed by Compute-Runtime-Automation
parent aa0beb8191
commit 23eeaf816d
11 changed files with 304 additions and 11 deletions

View File

@@ -29,6 +29,7 @@ class DrmMock : public Drm {
using Drm::cacheInfo;
using Drm::checkQueueSliceSupport;
using Drm::chunkingAvailable;
using Drm::chunkingMode;
using Drm::classHandles;
using Drm::completionFenceSupported;
using Drm::contextDebugSupported;
@@ -39,6 +40,7 @@ class DrmMock : public Drm {
using Drm::getQueueSliceCount;
using Drm::ioctlHelper;
using Drm::memoryInfo;
using Drm::minimalChunkingSize;
using Drm::nonPersistentContextsSupported;
using Drm::pageFaultSupported;
using Drm::pagingFence;
@@ -149,6 +151,13 @@ class DrmMock : public Drm {
return chunkingAvailable;
}
uint32_t getChunkingMode() override {
if (callBaseChunkingMode) {
return Drm::isChunkingAvailable();
}
return chunkingMode;
}
bool getSetPairAvailable() override {
if (callBaseGetSetPairAvailable) {
return Drm::getSetPairAvailable();
@@ -207,6 +216,8 @@ class DrmMock : public Drm {
bool callBaseIsVmBindAvailable = false;
bool callBaseIsSetPairAvailable = false;
bool callBaseIsChunkingAvailable = false;
bool callBaseGetChunkingMode = false;
bool callBaseChunkingMode = false;
bool callBaseGetSetPairAvailable = false;
bool unrecoverableContextSet = false;
bool failRetHwIpVersion = false;