I tried to create a program from source, build it and save its binary, and then create a program from binary. However, when I went to build it the second time I got the follow error: -42 (CL_INVALID_BINARY). I tracked down the issue being that the order of the cl_device_id's I passed to clCreateContext, if not the same order I get when I query clProgramGetInfo with CL_PROGRAM_DEVICES. This was quite an unexpected surprise. Why wouldn't this order be maintained? Changing that order causes me more headache as I need to query clGetDeviceInfo all over again. I realize after reading through the spec that it does not require a consistent order, but what is to be gained from not maintaining an order even within the same program execution?
Btw, I'm using the latest non-beta Intel graphics driver and OpenCL SDK for Windows 8.1 64-bit with Visual Studio 2012 Professional.