Regarding the work group size

I am giving the local workgroup size as NULL in the host program
If my global item size is a prime number let say 17 which is less than the max workgroup size we can have how many workgroups does the OpenCl framework divide the global item size into??
would it be 17 workgroups of size 1 or 1 workgroup of size 17

It’s entirely up to the OpenCL driver. If you’re using an NVIDIA GPU then the timeline profiler can tell you the actual work-group size (provided your driver and CUDA installation are sufficiently old: they seem to be removing OpenCL support from their dev tools).