only log MDAPI event profiling errors for kernel events #379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
With the current implementation in the GPU drivers MDAPI metrics are only included for kernels, and are not included for other event types, such as clEnqueueReadBuffer, clEnqueueWriteBuffer, etc. This causes distracting error messages to be printed because the calls to get MDAPI event profiling info for the other types of events is failing. This PR filters these events so the error messages are only printed for kernel events, where the failure is currently unexpected.
Testing Done
Tested with a MDAPI event based sampling enabled and a sample app that enqueues kernels and other commands. Observed that MDAPI metrics are collected for kernels and no errors are seen.