Add debug flag to skip freeing resources.

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2021-08-06 12:57:10 +00:00
committed by Compute-Runtime-Automation
parent 0d11b51c6b
commit 8a506457d7
4 changed files with 16 additions and 1 deletions

View File

@ -4468,6 +4468,16 @@ TEST_F(DrmMemoryManagerTest, whenWddmMemoryManagerIsCreatedThenAlignmentSelector
EXPECT_EQ(expectedAlignments, memoryManager.alignmentSelector.peekCandidateAlignments());
}
TEST_F(DrmMemoryManagerTest, whenDebugFlagToNotFreeResourcesIsSpecifiedThenFreeIsNotDoingAnything) {
DebugManagerStateRestore restorer;
DebugManager.flags.DoNotFreeResources.set(true);
TestedDrmMemoryManager memoryManager(false, false, false, *executionEnvironment);
size_t sizeIn = 1024llu;
uint64_t gpuAddress = 0x1337llu;
DrmAllocation stackDrmAllocation(0u, GraphicsAllocation::AllocationType::BUFFER, nullptr, nullptr, gpuAddress, sizeIn, MemoryPool::System64KBPages);
memoryManager.freeGraphicsMemoryImpl(&stackDrmAllocation);
}
TEST_F(DrmMemoryManagerTest, given2MbPagesDisabledWhenWddmMemoryManagerIsCreatedThenAlignmentSelectorHasExpectedAlignments) {
DebugManagerStateRestore restore{};
DebugManager.flags.AlignLocalMemoryVaTo2MB.set(0);

View File

@ -316,4 +316,5 @@ OverrideSystolicPipelineSelect = -1
OverrideSystolicInComputeWalker = -1
OverrideKernelSizeLimitForSmallDispatch = -1
SkipFlushingEventsOnGetStatusCalls = 0
AllowUnrestrictedSize = 0
AllowUnrestrictedSize = 0
DoNotFreeResources = 0