cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

jirmik
Adept I

Unknown OpenCL contexts appearing in my CodeXL timeline

Profiling my OpenCL application (linked with OpenCL.lib from APP SDK v2.9) running on R9 290X under Windows 7 x64, the GPU application trace timeline in CodeXL 1.3.4590.0 looked very strange. Apart from my 3 command queues in my single context, there were also many other contexts with weird numbers, some of them even with queues (also weird numbered). On the other hand, many of my OpenCL function calls were not marked in the timeline view, so such profiling was a bit useless for me.

I've stripped my application to bare minimum which still causes the CodeXL to show this strange timeline. This minimum is a bit surrealistic: it still creates my single context with 3 queues but then only repeatedly makes one of the queues wait for another one, selecting different pair of queues in each iteration. No kernels launched, no memory allocations, no memory copies. Of course, my real application contains many kernels and memory transfers as well, but they are not needed to make the CodeXL show the weird timeline. The minimal code is attached. Screenshot of the timeline is attached too.

Can anyone verify this behavior? And if verified, is this problem of CodeXL or AMD OpenCL runtime or a problem of my PC or my application? My application uses clEnqueueMarker-clEnqueueWaitForEvents-clReleaseEvent idiom to make one queue wait for another without blocking the calling CPU thread. Is this correct usage?

Thanks,

Martin Jirman

0 Likes
1 Solution

Hi Martin,

This issue was just brought to my attention.  I took a quick look at it and have discovered a bug in the way the clEnqueueMarker api is handled by the GPU Profiler.  I have entered a bug into our internal bug tracking system, and will submit a fix for the problem soon.

Thanks for the report and the narrowed-down test case.  It was quite helpful in quickly diagnosing the problem.

Thanks,

Chris

View solution in original post

6 Replies

Hi,

We have passed your query to the CodeXL team. Waiting for their reply.

Thanks,

AMD Support

0 Likes

Hi, any news about this?

0 Likes

Hi Martin,

This issue was just brought to my attention.  I took a quick look at it and have discovered a bug in the way the clEnqueueMarker api is handled by the GPU Profiler.  I have entered a bug into our internal bug tracking system, and will submit a fix for the problem soon.

Thanks for the report and the narrowed-down test case.  It was quite helpful in quickly diagnosing the problem.

Thanks,

Chris

Hi Christopher,

thanks for info. When can we expect a new release of the CodeXL with this issue fixed? Is there some sort of public schedule?

Thanks,

Martin

0 Likes

Hi Martin,

There is no public release schedule that I am aware of.  I also wanted to mention that the problem does not reproduce if I modify the sample code to use clEnqueueMarkerWithWaitList instead of clEnqueueMarker/clEnqueueWaitForEvents.  I'm not sure if it makes sense to do this in your application, but I thought I would mention it to you.

Both clEnqueueMarker and clEnqueueWaitForEvents were deprecated in OpenCL 1.2.  See Deprecated OpenCL Functions.

Chris

Hi Chris,

I know clEnqueueMarkerWithWaitList and I like the way it is intended to be used, but we need our library to be backwards compatible. I hope that we will be able to set up some sort of dynamic selection between clEnqueueMarker/clEnqueueWaitForEvents and clEnqueueMarkerWithWaitList based on OpenCL version, to be able to fully support future OpenCL versions with single build of our library.

Anyway, thanks for the info.

Martin

0 Likes