Skip to content

Commit

Permalink
only log MDAPI event profiling errors for kernel events (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Sep 20, 2024
1 parent 67d4c97 commit 391607c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions intercept/mdapi/intercept_mdapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,9 +458,21 @@ void CLIntercept::getMDAPICountersFromEvent(
}
else
{
logf("Couldn't get MDAPI data! clGetEventProfilingInfo returned '%s' (%08X)!\n",
enumName().name(errorCode).c_str(),
errorCode );
// Currently, MDAPI data is only included for kernels, so only
// report an errors for kernel events.
cl_command_type type = 0;
dispatch().clGetEventInfo(
event,
CL_EVENT_COMMAND_TYPE,
sizeof(type),
&type,
NULL );
if( type == CL_COMMAND_NDRANGE_KERNEL )
{
logf("Couldn't get MDAPI data for kernel! clGetEventProfilingInfo returned '%s' (%08X)!\n",
enumName().name(errorCode).c_str(),
errorCode );
}
}

delete [] pReport;
Expand Down

0 comments on commit 391607c

Please sign in to comment.