File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -458,9 +458,21 @@ void CLIntercept::getMDAPICountersFromEvent(
458
458
}
459
459
else
460
460
{
461
- logf (" Couldn't get MDAPI data! clGetEventProfilingInfo returned '%s' (%08X)!\n " ,
462
- enumName ().name (errorCode).c_str (),
463
- errorCode );
461
+ // Currently, MDAPI data is only included for kernels, so only
462
+ // report an errors for kernel events.
463
+ cl_command_type type = 0 ;
464
+ dispatch ().clGetEventInfo (
465
+ event,
466
+ CL_EVENT_COMMAND_TYPE,
467
+ sizeof (type),
468
+ &type,
469
+ NULL );
470
+ if ( type == CL_COMMAND_NDRANGE_KERNEL )
471
+ {
472
+ logf (" Couldn't get MDAPI data for kernel! clGetEventProfilingInfo returned '%s' (%08X)!\n " ,
473
+ enumName ().name (errorCode).c_str (),
474
+ errorCode );
475
+ }
464
476
}
465
477
466
478
delete [] pReport;
You can’t perform that action at this time.
0 commit comments