Debug flag to override BCS cache flush requirement

Change-Id: I5958835fbf2cd56bd5e46cdc4b10a87a1cc2471c
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-06-23 12:01:22 +02:00
parent 6645cd99e6
commit 61cf2b6c33
4 changed files with 16 additions and 1 deletions

View File

@ -125,6 +125,9 @@ bool CommandQueueHw<Family>::forceStateless(size_t size) {
template <typename Family>
bool CommandQueueHw<Family>::isCacheFlushForBcsRequired() const {
if (DebugManager.flags.ForceCacheFlushForBcs.get() != -1) {
return !!DebugManager.flags.ForceCacheFlushForBcs.get();
}
return true;
}

View File

@ -1014,4 +1014,14 @@ HWTEST_TEMPLATED_F(BlitEnqueueFlushTests, givenBlockedQueueWhenBlitEnqueuedThenF
EXPECT_FALSE(commandQueue->isQueueBlocked());
}
HWTEST_TEMPLATED_F(BlitEnqueueFlushTests, givenDebugFlagSetWhenCheckingBcsCacheFlushRequirementThenReturnCorrectValue) {
auto mockCommandQueue = static_cast<MockCommandQueueHw<FamilyType> *>(commandQueue.get());
DebugManager.flags.ForceCacheFlushForBcs.set(0);
EXPECT_FALSE(mockCommandQueue->isCacheFlushForBcsRequired());
DebugManager.flags.ForceCacheFlushForBcs.set(1);
EXPECT_TRUE(mockCommandQueue->isCacheFlushForBcsRequired());
}
} // namespace NEO

View File

@ -169,4 +169,5 @@ PrintExecutionBuffer = 0
EnableCrossDeviceAccess = -1
PauseOnBlitCopy = -1
ForceImplicitFlush = 0
OverrideRevision = -1
OverrideRevision = -1
ForceCacheFlushForBcs = -1

View File

@ -57,6 +57,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, FlushAfterEachBlit, -1, "-1: default, 0: disable
DECLARE_DEBUG_VARIABLE(int32_t, OverridePreemptionSurfaceSizeInMb, -1, "-1: default, >=0 Override preemption surface size with value")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideLeastOccupiedBank, -1, "-1: default, >=0 Override least occupied bank with value")
DECLARE_DEBUG_VARIABLE(int32_t, OverrideRevision, -1, "-1: default, >=0: Revision id")
DECLARE_DEBUG_VARIABLE(int32_t, ForceCacheFlushForBcs, -1, "Force cache flush from gpgpu engine before dispatching BCS copy. -1: default, 1: enabled, 0: disabled")
DECLARE_DEBUG_VARIABLE(bool, EnableDebugBreak, true, "Enable DEBUG_BREAKs")
DECLARE_DEBUG_VARIABLE(bool, FlushAllCaches, false, "pipe controls between enqueues flush all possible caches")
DECLARE_DEBUG_VARIABLE(bool, MakeEachEnqueueBlocking, false, "equivalent of finish after each enqueue")