Hey guys, so I'm having some issues getting my code to run on certain openCL devices. I'm developing on a mid-2013 15" retina screen Macbook pro on OSX 10.9.5 (Mavericks) and using Xcode 6.0.1
After using clGetDeviceIDs to access all available devices and using clGetDeviceInfo to see the info for each device I get the following:
Device: Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
Hardware version: OpenCL 1.2
Software version: 1.1
OpenCL C version: OpenCL C 1.2
Parallel compute units: 8
Device: HD Graphics 4000
Hardware version: OpenCL 1.2
Software version: 1.2(Aug 17 2014 20:29:07)
OpenCL C version: OpenCL C 1.2
Parallel compute units: 16
Device: GeForce GT 650M
Hardware version: OpenCL 1.2
Software version: 8.26.28 310.40.55b01
OpenCL C version: OpenCL C 1.2
Parallel compute units: 2
So according to this, I should have 1 CPU and 2 GPUs available: a HD Graphics 4000 and a GeForce GT 650M.
My issue is when I try to call clGetkernelWorkGroupInfo, it returns a CL_INVALID_DEVICE error if I pass in the deviceID of one of the two GPUs but works perfectly fine if I pass in the CPU id and will compute my kernel code without issue.
This is weird because all of my other calls up until that point work for all 3 devices. I can create a context that encompasses all 3 devices, create 3 separate command queues (one per device), and I can compile a program and create the kernel just fine. But as soon as I get to that call it says my device is invalid.
Is there something wrong with the graphics cards I have installed on my computer? Or is there something codewise I have to do that I'm not aware of? I just don't see how a device can be valid up until that one call and then suddenly not be valid.
After using clGetDeviceIDs to access all available devices and using clGetDeviceInfo to see the info for each device I get the following:
Device: Intel(R) Core(TM) i7-3635QM CPU @ 2.40GHz
Hardware version: OpenCL 1.2
Software version: 1.1
OpenCL C version: OpenCL C 1.2
Parallel compute units: 8
Device: HD Graphics 4000
Hardware version: OpenCL 1.2
Software version: 1.2(Aug 17 2014 20:29:07)
OpenCL C version: OpenCL C 1.2
Parallel compute units: 16
Device: GeForce GT 650M
Hardware version: OpenCL 1.2
Software version: 8.26.28 310.40.55b01
OpenCL C version: OpenCL C 1.2
Parallel compute units: 2
So according to this, I should have 1 CPU and 2 GPUs available: a HD Graphics 4000 and a GeForce GT 650M.
My issue is when I try to call clGetkernelWorkGroupInfo, it returns a CL_INVALID_DEVICE error if I pass in the deviceID of one of the two GPUs but works perfectly fine if I pass in the CPU id and will compute my kernel code without issue.
This is weird because all of my other calls up until that point work for all 3 devices. I can create a context that encompasses all 3 devices, create 3 separate command queues (one per device), and I can compile a program and create the kernel just fine. But as soon as I get to that call it says my device is invalid.
Is there something wrong with the graphics cards I have installed on my computer? Or is there something codewise I have to do that I'm not aware of? I just don't see how a device can be valid up until that one call and then suddenly not be valid.