cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

Highlighted
Journeyman III
Journeyman III

AMD CodeXL GPU profiling

Jump to solution

Hi,

I am trying to profile my application using CodeXL and have been receiving warnings showing Memory leaks in different positions where I cannot see any memory leak happening. I am receiving messages like this:

Memory leak detected [Ref = 1, Handle = 0x000000000467D7B0]: Object created by clCreateCommandQueue

This is the code for creating command queue:

commands = clCreateCommandQueue(context, device_id, CL_QUEUE_PROFILING_ENABLE, &err);

I am receiving similar messages for clCreateProgramWithSource, clEnqueueNDRangeKernel, clEnqueueWriteBuffer etc.

I would like to ask what might be the source of the warning or if I have to change any function call.

Tags (2)
0 Kudos
Reply
1 Solution

Accepted Solutions
Highlighted
Staff
Staff

Re: AMD CodeXL GPU profiling

Jump to solution

Hi,

Do you use AMD APP SDK utils files?  if yes, there is a known issue and will be fixed in upcoming release.

Do you use events in the clEnqueueWriteBuffer and ClEnqueueNDRangeKernel API calls? If yes, don't forget to release all them.

Regards,

Ravi

View solution in original post

0 Kudos
Reply
4 Replies
Highlighted
Challenger
Challenger

Re: AMD CodeXL GPU profiling

Jump to solution

Hi,

Do you use clReleaseCommandQueue? It will flush any remaining commands from the Q. If you still have commands left in Q when you finish, they may register as memory leaks.

Highlighted
Journeyman III
Journeyman III

Re: AMD CodeXL GPU profiling

Jump to solution

Yes I have. If that is true, how can the same be said for clEnqueueWriteBuffer and ClEnqueueNDRangeKernel?

0 Kudos
Reply
Highlighted
Staff
Staff

Re: AMD CodeXL GPU profiling

Jump to solution

Hi,

Do you use AMD APP SDK utils files?  if yes, there is a known issue and will be fixed in upcoming release.

Do you use events in the clEnqueueWriteBuffer and ClEnqueueNDRangeKernel API calls? If yes, don't forget to release all them.

Regards,

Ravi

View solution in original post

0 Kudos
Reply
Highlighted
Journeyman III
Journeyman III

Re: AMD CodeXL GPU profiling

Jump to solution

Yes, I do use the AMD APP SDK files.

I used NULL throughout. I have used events and then released them to find that the warnings go away. Thanks.

0 Kudos
Reply