Add debug flag to control tryFlushEvent

Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2021-07-14 14:04:37 +00:00
committed by Compute-Runtime-Automation
parent a869921c2a
commit d18172c00e
4 changed files with 37 additions and 2 deletions

View File

@ -2012,6 +2012,7 @@ cl_int CL_API_CALL clGetEventInfo(cl_event event,
}
GetInfoHelper info(paramValue, paramValueSize, paramValueSizeRet);
auto flushEvents = true;
switch (paramName) {
default: {
@ -2041,7 +2042,13 @@ cl_int CL_API_CALL clGetEventInfo(cl_event event,
TRACING_EXIT(clGetEventInfo, &retVal);
return retVal;
case CL_EVENT_COMMAND_EXECUTION_STATUS:
neoEvent->tryFlushEvent();
if (DebugManager.flags.SkipFlushingEventsOnGetStatusCalls.get()) {
flushEvents = false;
}
if (flushEvents) {
neoEvent->tryFlushEvent();
}
if (neoEvent->isUserEvent()) {
auto executionStatus = neoEvent->peekExecutionStatus();
//Spec requires initial state to be queued