clGetDeivceIDs fails...driver issue?

Hi All,

I have been developing code for openCL for the past month or so and I have a large codebase running on a Mac. I need to port that code to Windows and have been using this: GitHub - jasonjtyler/OpenCLProjects: OpenCL projects for Visual Studio 2010.
as a test project to get something going in Visual Studio (and essentially confirm all the basics are working).

System Stats:

  1. Core i7 (Ivy Bridge)
  2. Intel Integrated gfx and AMD Radeon HD 8700M
  3. (for more details it is a Samsung Series 7 Chronos Model #NP780Z5E)
  4. Windows 8 (OS)

I have had no such luck getting the basics working. I have used GPU-Z to ensure the driver/HW does support OpenCL. GPU-Z does confirm that AMD does support OpenCL. The Intel driver does not support openCL (according to Intel’s driver check applet it is a custom Samsung version of the driver).

If you look at the OpenCLProjects github you will see two visual studio projects:

  1. OpenCL.GetParameterInfo - This fully works. It shows both the Intel and AMD devices.
  2. OpenCL.SimpleKernal --This fails on the clGetDeviceIDs call. It returns error code -1 (CL_DEVICE_NOT_FOUND).

Not sure why it is failing. It should be able to execute on the AMD device. Could someone please help? Thank you very much.

If I have failed to provide enough information please let me know what I could provide to help. I really need to get OpenCL working on Windows/Visual Studio.

Thank You,
George

Maybe it fails because you have two platforms installed (Intel and AMD). Your code takes the first platform returned by clGetPlatformID, and tries to get a GPU device. If the first platform on the list is Intel and has only a CPU device, it makes sense that it fails.