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.
1663 Discussions

Memory leak in clSetKernelArg with arg_value=NULL

Saurabh_A_
Beginner
186 Views

I am using "block_advanced_motion_estimate_check_intel" kernel for motion estimation. As per OpenCL Extensions for AVME, some of the arg_value can be set to NULL if the corresponding parameter needs to be ignored. When setting arg_value to NULL, there is a memory leak and valgrind shows the leak in the NULL argument lines. Is there any way to pass NULL and still get rid of memory leak? Is there any setting required so that this scenario is not treated as memory leak?

0 Kudos
3 Replies
Ben_A_Intel
Employee
186 Views

Hi Saurabh, thank you for the report.  We're looking into this.

Ben_A_Intel
Employee
186 Views

Hi Saurabh, could you please provide a bit more information to help us reproduce your issue:

- Which argument are you setting to NULL?

- Which device are you running on, which OS are you using, and what is your driver version?

Thanks!

Biju_G_Intel
Employee
186 Views

Hello Saurabh,

As Ben mentioned, this issue is being looked into.

One point to note regarding the choice of using the OpenCL Extensions for AVME extension. I would encourage you to use the newer cl_intel_device_side_avc_motion_estimation extension instead. The latter is more flexible in that it allows you to write customized VME kernels for your specific use case with better performance and quality, and also provides more VME functionality. The are samples that you can leverage from https://software.intel.com/en-us/articles/intro-ds-vme and https://software.intel.com/en-us/articles/opencl-extension-tutorial-1 to get going.

In the case you really want the functionality already implemented in OpenCL Extensions for AVME , we can provide a sample doing the same but using cl_intel_device_side_avc_motion_estimation.

 

Reply