OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
Announcements
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1719 Discussions

Buffer not realeased if cl_event referring to a write is still present

Matthias_H_4
Beginner
357 Views

Hi everyone,

I wrote a little profiler for my application that collects cl_event objects to evaluate them after the application has done all its work, so not to have an impact on performance. I am also making use of clSetMemObjectDestructorCallback. This tells me that Buffers are not released until I release the cl_event objects which refer to a read or write to the buffers.

Is this desired behaviour? I couldn't find anything in the standard concerning this particular issue. Other implementations do behave differently. Is there may me any way to decouple the buffers from the events so they can be released in my application during "work-time" and not during "profiling-time"? Because this obviously consumes all my memory over runtime.

Best regards

Matthias

0 Kudos
2 Replies
Evgeny_F_Intel
Employee
357 Views

Hello Metthias,

Could you please specify device type you are using and exact driver version?

We will very appriciate if you also could share your application.

Evgeny

0 Kudos
Matthias_H_4
Beginner
357 Views

Hello Evgeny.

The device is a Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz and I'm using the opencl-1.2-3.0.67279 SDK. Not sure where to find the driver version.

As to giving you the application, I first have to check. I attached my device-wrapper and the profiling class that stores the event objects. You should be able to use them and reproduce the behaviour. (You only need STL and boost::container::flat_map)

Thank you for your time on this.

Best regards,

Matthias

0 Kudos
Reply