Hi,
Please help me on this opencl issue:
I have a kernel program file that runs fine on AMD and NVidia graphics cards, as well as on other Intel GPUs,
such as intel HD4600. But when trying to run it on Intel HD530 graphics card, I catched a memory leaking on
it.
The memory leaking points I located is in calling the OpenCL API function: clSetKernelArg().
It occurs only in Intel HD530 with driver version 4664 and 4678, but does not occur with driver version 4352.
It occurs with only when calling clSetKernelArg() to set __local buffers of the kernel, but does not occur
when setting __global and __private buffers.
The memory leaking speed I tested is 32 Bytes when calling clSetKernelArg() to set __local buffers each time,
which leaks only in CPU host memory but not in GPU device memory regardless of how much the size of __local memory was set.
Here is my testing enviroment:
Hardware:
CPU: i5-6500
GPU: Intel HD Graphics 530
Software:
OS: Win7 64bit (inner version: 7601)
GPU Driver version: 15.45.19.4678/15.45.18.4664(found mem leak on it) / 15.40.14.4352(did not find mem leak
on it)
Here is my testing code (part of):
kernel codes:
__kernel void TestNull(
__local uchar *localMemuchar,
__local int *localMemint,
__local float *localMemdouble)
{}
Host codes:
// ...init opencl context, program and kernels
size_t szW = 64;
size_t szH = 64;
for (int i = 0; i < 1000000; i++)
{
clStatus = clSetKernelArg(kernelTestNull, 0, sizeof(cl_uchar) *szW * szH, NULL);
clStatus = clSetKernelArg(kernelTestNull, 1, sizeof(cl_int) *szW * szH, NULL);
clStatus = clSetKernelArg(kernelTestNull, 2, sizeof(cl_float) *szW * szH, NULL);
}
// ...release opencl context, program and kernels
Any insight into this issue is welcome and is greatly appreciated.
Thanks,