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

@@ -279,3 +279,12 @@ bool DrmMockCustom::getChunkingAvailable() {
return getChunkingAvailableCall.returnValue;
}
}
uint32_t DrmMockCustom::getChunkingMode() {
getChunkingModeCall.called++;
if (getChunkingModeCall.callParent) {
return Drm::getChunkingMode();
} else {
return getChunkingModeCall.returnValue;
}
}

View File

@@ -127,6 +127,12 @@ class DrmMockCustom : public Drm {
uint32_t called = 0u;
};
struct ChunkingModeCall {
bool callParent = true;
uint32_t returnValue = 0x00;
uint32_t called = 0u;
};
DrmMockCustom(RootDeviceEnvironment &rootDeviceEnvironment);
int waitUserFence(uint32_t ctxId, uint64_t address, uint64_t value, ValueWidth dataWidth, int64_t timeout, uint16_t flags) override;
@@ -134,6 +140,7 @@ class DrmMockCustom : public Drm {
bool getSetPairAvailable() override;
bool getChunkingAvailable() override;
uint32_t getChunkingMode() override;
bool isChunkingAvailable() override;
bool isVmBindAvailable() override;
@@ -181,6 +188,7 @@ class DrmMockCustom : public Drm {
IsVmBindAvailableCall isVmBindAvailableCall{};
IsChunkingAvailableCall getChunkingAvailableCall{};
ChunkingModeCall getChunkingModeCall{};
IsChunkingAvailableCall isChunkingAvailableCall{};
std::atomic<int> ioctlRes;