- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a memory issue with the HD4000 GPU: I use a simple kernel that performs 2 simple operations, I run it over hundred of times (in a host loop), before each call I release all device and host buffers like this:
ret = clReleaseMemObject(bufin1_mem_obj);
ret = clReleaseMemObject(bufin2_mem_obj);
ret = clReleaseMemObject(bufout1_mem_obj);
ret = clReleaseMemObject(bufout2_mem_obj);
ret = clReleaseMemObject(debugbuf_mem_obj);
ret = clReleaseKernel(kernel);
ret = clReleaseProgram(program);
ret = clReleaseEvent(ev);
ret = clFlush(command_queue);
ret = clFinish(command_queue);
ret = clReleaseCommandQueue(command_queue);
ret = clReleaseContext(context);
free(bufin1);
free(bufin2);
free(buf_out_1);
free(buf_out_2);
free(debug_buf);
free(perfs);
free(times);
free(logTitle);
free(logline);
the problem is, when I use the same code with an AMD GPU, I have no memory problem, but when I run it on the HD4000, I have a memory leakage after 22 kernel calls, it seems that the GPU doesn't freed memory.
is it a known issue ?
THX,
Mohamed
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, I finally found what's went wrong with my program:
I'm using events to profile the exucution time of the kernel (in a loop) and I release the event object just one time=>a memory leakage occurs, to avoid this issue I must release the event object each time I call clEnqueueNDRangeKernel(...........,ev);
thx,
Mohamed

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page