Debug flag to force implicit flush

Change-Id: I40f1ecb323a61242cbf230e02ba14fce510dbabf
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-06-19 09:50:04 +02:00
committed by sys_ocldev
parent 1a90061d54
commit 2500357ad5
4 changed files with 19 additions and 0 deletions

View File

@ -55,6 +55,18 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenForceCsrFlushingDebugVariable
EXPECT_TRUE(commandStreamReceiver.flushBatchedSubmissionsCalled);
}
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenForceImplicitFlushDebugVariableSetWhenFlushingThenFlushBatchedSubmissionsShouldBeCalled) {
DebugManagerStateRestore restore;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
commandStreamReceiver.dispatchMode = DispatchMode::BatchedDispatch;
DebugManager.flags.ForceImplicitFlush.set(true);
flushTask(commandStreamReceiver);
EXPECT_TRUE(commandStreamReceiver.flushBatchedSubmissionsCalled);
}
HWTEST_F(CommandStreamReceiverFlushTaskTests, givenOverrideThreadArbitrationPolicyDebugVariableSetWhenFlushingThenRequestRequiredMode) {
DebugManagerStateRestore restore;
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();

View File

@ -168,3 +168,4 @@ EnableMultiStorageResources = -1
PrintExecutionBuffer = 0
EnableCrossDeviceAccess = -1
PauseOnBlitCopy = -1
ForceImplicitFlush = 0

View File

@ -180,6 +180,11 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
if (DebugManager.flags.ForceCsrFlushing.get()) {
flushBatchedSubmissions();
}
if (DebugManager.flags.ForceImplicitFlush.get()) {
dispatchFlags.implicitFlush = true;
}
if (detectInitProgrammingFlagsRequired(dispatchFlags)) {
initProgrammingFlags();
}

View File

@ -66,6 +66,7 @@ DECLARE_DEBUG_VARIABLE(bool, RebuildPrecompiledKernels, false, "forces driver to
DECLARE_DEBUG_VARIABLE(bool, LoopAtDriverInit, false, "Adds endless loop in DebugSettingsManager constructor, useful for debugging.")
DECLARE_DEBUG_VARIABLE(bool, DoNotRegisterTrimCallback, false, "When set to true driver is not registering trim callback.")
DECLARE_DEBUG_VARIABLE(bool, OverrideInvalidEngineWithDefault, false, "When set to true driver chooses engine 0 if no engine is found.")
DECLARE_DEBUG_VARIABLE(bool, ForceImplicitFlush, false, "Flush after each enqueue. Useful for debugging batched submission logic. ")
/*LOGGING FLAGS*/
DECLARE_DEBUG_VARIABLE(bool, PrintDeviceAndEngineIdOnSubmission, false, "print submissions device and engine IDs to standard output")