query utilized local memory size return wrong value

Discussion created by rotor on Oct 19, 2010
Latest reply on Nov 13, 2010 by himanshu.gautam
CL_KERNEL_LOCAL_MEM_SIZE return zero value

Hi all,

I try to query the size of utilized local memory of a kernel but it return value equal zero even my kernel has utilized 1KB of local memory already. A snip of code is attached here. What is the reason of this wrong value? is that a bug?


clSetKernelArg( kernel, 0, 512*sizeof(cl_ushort), NULL); //check used local memory status = clGetKernelWorkGroupInfo( kernel, glob_devices,//devices[0], CL_KERNEL_LOCAL_MEM_SIZE, sizeof(cl_ulong), &usedLocalMemory, NULL); if(!sampleCommon->checkVal( status, CL_SUCCESS, "clGetKernelWorkGroupInfo CL_KERNEL_LOCAL_MEM_SIZE failed.")) { return SDK_FAILURE; }