Add new debug key for implicit flushes

Change-Id: Ifbf8903c383d16f62754655a5bc949f27d290c42
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-09-17 08:58:06 +02:00
committed by sys_ocldev
parent c381f371cd
commit 9981cdd9e2
4 changed files with 66 additions and 7 deletions

View File

@@ -179,6 +179,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
DBG_LOG(LogTaskCounts, __FUNCTION__, "Line: ", __LINE__, "taskLevel", taskLevel);
auto levelClosed = false;
bool implicitFlush = dispatchFlags.implicitFlush || dispatchFlags.blocking || DebugManager.flags.ForceImplicitFlush.get();
void *currentPipeControlForNooping = nullptr;
void *epiloguePipeControlLocation = nullptr;
@@ -186,10 +187,6 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
flushBatchedSubmissions();
}
if (DebugManager.flags.ForceImplicitFlush.get()) {
dispatchFlags.implicitFlush = true;
}
if (detectInitProgrammingFlagsRequired(dispatchFlags)) {
initProgrammingFlags();
}
@@ -547,11 +544,17 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
//check if we are not over the budget, if we are do implicit flush
if (getMemoryManager()->isMemoryBudgetExhausted()) {
if (this->totalMemoryUsed >= device.getDeviceInfo().globalMemSize / 4) {
dispatchFlags.implicitFlush = true;
implicitFlush = true;
}
}
if (this->dispatchMode == DispatchMode::BatchedDispatch && (dispatchFlags.blocking || dispatchFlags.implicitFlush)) {
if (DebugManager.flags.PerformImplicitFlushEveryEnqueueCount.get() != -1) {
if ((taskCount + 1) % DebugManager.flags.PerformImplicitFlushEveryEnqueueCount.get() == 0) {
implicitFlush = true;
}
}
if (this->dispatchMode == DispatchMode::BatchedDispatch && implicitFlush) {
this->flushBatchedSubmissions();
}