Use clGetDeviceInfo() with parameters CL_DEVICE_QUEUE_ON_DEVICE_ PREFERRED_SIZE and CL_DEVICE_QUEUE_ON_DEVICE_ MAX_SIZE.
The minimum value for CL_DEVICE_QUEUE_ON_DEVICE_ PREFERRED_SIZE is 16KB, so 100 bytes is probably too small a value to be accepted by clCreateCommandQueueWithProperties().
OK, I test size of memory for command queue on my devices. On my ATI device I have 0B for command queue. So I try it to another nVidia Geforce 940MX GPU and there is 64KB memory for command queue. But when I want to create commnad queue debuger write me error and program fall down.
Debuger write “Second Chance Exception” after clCreateCommandQueue command. The text of error is:
The thread tried to read or write data that is misaligned on hardware that does not provide alignment. For example, 16-bit values must be aligned on 2-byte boundaries; 32-bit values on 4-byte boundaries, and so on.
I find solution, nVidia GPU don´t have a command named clCreateCommandQueueWithProperties so there is only clCreateCommandQueue.
But using clCreateCommandQueue I don´t have to use properties for queue on device.
On-device command queues are an OpenCL 2 feature. OpenCL 2 is currently not supported by NVidia device drivers, because NVidia would rather have you write code in CUDA and lock yourself into their hardware.
I think you could save yourself from many headaches by using the OpenCL platform and device queries (clGetPlatformInfo / clGetDeviceInfo) in order to know which OpenCL version (CL_PLATFORM_VERSION) and features (read the spec for your OpenCL version) your hardware actually supports.