I'm just starting to learn OpenCL. This is on a simple Desktop machine with Intel Haswell CPU + Intel HD Graphics 4600. For now I use PyOpenCL and the provided examples. My question is, if the code is running on CPU or GPU?
platforms = cl.get_platforms()
platforms[0].get_devices()
[<pyopencl.Device 'Intel(R) Core(TM) i5-4570S CPU @ 2.90GHz' on 'Intel(R) OpenCL' at 0x706ac40>]
This looks like CPU. But is there any distinction at all or is it the Intel driver that decides where the kernel runs (CPU or GPU)? if this is the CPU only how do I make it run on the iGPU?
I found the issue. It is only using the CPU and no GPU is listed. I'm on Windows 7. The issue/solution I I found on this other SO question.
Maxim Shevtsov (Intel): Likely this is the actual root-cause. Currently Processor Graphics OCL device in unavailable in the "headless" configuration (without a monitor plugged in).
I'm connecting to said PC via Remote Desktop (don't ask why...) and hence it's headless and hence iGPU not available as OpenCL device.
According to this thread on Intel forums with newest drivers and Windows 8 or higher this works. But not in Windows 7 (and as far as I can tell not on 3rd Gen core-i processors eg. Ivy bridge).
Good enough for me for now as I get started. Later I would like to actually see if I gain anything from the GPU.