I'm using Intel OpenCL SDK. Last month, when I tried to run my opencl code on CPU present in my system , by clGetDeviceIDs(platform, CL_DEVICE_TYPE_CPU, 0, NULL, &num_devices), it worked..and number of total platforms its detected is 2.One is Intel GPU and another is Intel CPU.I was able to run the code both on Intel GPU and CPU just by changing the macro CL_DEVICE_TYPE_CPU. But now when I try to detect the platform and devices on the same system, its not detecting CPU. Its showing available platforms as 1 that is Intel GPU. So, when clGetDeviceIDs(platform, CL_DEVICE_TYPE_CPU, 0, NULL,&num_devices); is called it returns -1 (CL_DEVICE_NOT_FOUND) and program is exiting.
Can anyone please help me on resolving the issue , why on the same system CPU is not getting detected, when we have Intel CPU available on it. But GPU is getting detected correctly with macro CL_DEVICE_TYPE_GPU. Thanks.
Intel OpenCL runtime for GPU is a part of Intel GPU driver. So, it is enough to install the GPU driver from Intel and you will be able to get OpenCL device for Intel GPU. But Intel OpenCL runtime for CPU should be installed separately: OpenCL Runtimes for Intel Processors. If Intel OpenCL runtime for CPU is installed but OpenCL CPU device is not available, it is necessary to check that ICD knows about the installed runtime and can find it. Please see sections 2.5-2.7 in The OpenCL Extension Specification on how the ICD loader looks for the runtime libraries.