Hello,
I'm trying to run code that was working on OpenCL GPU platform on Intel MIC platform. On the host computer, there is one Intel MIC, and two Xeon CPUs. I'm trying to get program binaries for caching (for the reasons described in the "Reusing Compilation Results with clCreateProgramWithBinary" article).
I'm only compiling for the MIC device, but clGetProgramInfo with CL_PROGRAM_NUM_DEVICES returns two devices.
However, clGetProgramInfo with CL_PROGRAM_BINARY_SIZES returns 0 B (CPU binary) and 810 B (MIC binary).
Finally, clGetProgramInfo with CL_PROGRAM_BINARIES fails with -59 (CL_INVALID_OPERATION). I have tried changing the value of the size argument, when too small (less than 2 * sizeof(void*) - the function needs two pointers to the buffers where to store the binaries) it returns CL_INVALID_VALUE, but when there is sufficient size, it just fails with CL_INVALID_OPERATION. Maybe I do not understand how this is supposed to work, but the same code works fine with GPUs.
My kernel is:
__kernel void f(__global int *p)
{
p[get_global_id(0)] = 0;
}
Version number: OpenCL 1.2 (Build 67279)
Operating System: Linux OS (Bullx linux)