AnsweredAssumed Answered

Error code -2 (Device not availaible) when running clCreateContextFromType

Question asked by fyfy on Jan 28, 2019
Latest reply on Jan 29, 2019 by fyfy

Hello Everyone,


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