mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Add new debug key for implicit flushes
Change-Id: Ifbf8903c383d16f62754655a5bc949f27d290c42 Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
c381f371cd
commit
9981cdd9e2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForUseHostPtr, false, "When active a
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableHostPtrTracking, -1, "Enable host ptr tracking: -1 - default platform setting, 0 - disabled, 1 - enabled")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, MaxHwThreadsPercent, 0, "If not zero then maximum number of used HW threads is capped to max * MaxHwThreadsPercent / 100")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, MinHwThreadsUnoccupied, 0, "If not zero then maximum number of used HW threads is reduced by MinHwThreadsUnoccupied")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, PerformImplicitFlushEveryEnqueueCount, -1, "If greater then 0, driver performs implicit flush every N submissions.")
|
||||
|
||||
/*DIRECT SUBMISSION FLAGS*/
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, EnableDirectSubmission, -1, "-1: default (disabled), 0: disable, 1:enable. Enables direct submission of command buffers bypassing KMD")
|
||||
|
||||
Reference in New Issue
Block a user