I'm currently retesting some OpenCL code and I recently had a problem on my code. When I'm trying to get the device list on my computer with the C++ Wrapper function ... I get a error -2 (CL_DEVICE_NOT_AVAILABLE) on clCreateContextFromType.
At the beginning, I though that this was because some drive letters on my computers have changed (new disks ) but it wasn't. Next, I though that it was because I've updated drivers, so I backward it but it don't work too.
The strangest is that it worked some weeks ago (end of november) just before I update my drivers from july to december.
To get the list of devices, I use this :
cl::Context myCtx = cl::Context(CL_DEVICE_TYPE_ALL, 0, NULL, NULL, &errorCode);
I'm running a Windows 7 x64 with a AMD Radeon RX 560
Could you help me to solve my problem ??
Thank you in advance
Thank you for reporting it.
Please share the clinfo output and the driver information. Also, it would be helpful if you mention the driver version where the code worked earlier.
Thank you for your quick answer.
Today, I seem to have resolved my problem. In fact, I used the default platform (ID 0) which on clinfo correspond to "Experimental OpenCL 2.1 CPU Only Platform" which correspond the Intel OpenCL SDK (I have forgotten that I had installed for my Xeons).
I tested in selecting the good platform and it seems to work.