Run OpenCL on CPU with no integrated graphics?

Hi,

I understand OpenCL is mostly aimed general programming on the graphics card. I have heard it’s also possible to run OpenCL on CPU’s which have integrated graphics. But what I am not sure about – is it possible to run OpenCL on non-integrated graphics CPU’s, like the i9-10900KF? so far i have managed to run CL on my graphics card (and that’s the whole reason I picked up the lib), but just curious if it’s possible on the hardware mentioned above as well.

Ahoj

I think you may be looking for an OpenCL driver that exposes OpenCL support for the CPU as a CPU, or one which exposes OpenCL support for the CPU as a GPU.

For the former, websearch for “opencl CL_DEVICE_TYPE_CPU”. That’s the OpenCL lingo used to query for CPU devices. Not sure of the latest status, but according to this 10 year old post, Intel’s and AMD’s OpenCL drivers support this. I’d start with the one that matches your CPU:

You might also check out Mesa3D. It looks like it supports some OpenCL, with and without GPUs (see Mesa Matrix).

Thanks for the reply. I have also been struggling to find dirvers for intel (non-integrated graphics) CPU’s , similar to what is mentioned in the linked thread. I am on unix platform (using an arch-based distro manjaro), and the closest I could find was the intel-compute-runtime found in the Arch repos. But after installing it, seems like my CPU (i9-10900KF) is still not found when running the clinfo command:

Number of platforms                               1
  Platform Name                                   NVIDIA CUDA
  Platform Vendor                                 NVIDIA Corporation
  Platform Version                                OpenCL 3.0 CUDA 11.4.158

I.e. it only recognizes my graphics card. I have also tried using CL_DEVICE_TYPE_CPU instead of CL_DEVICE_TYPE_GPU, but still gives 0 CPU devices upon compiling the program.
However I have managed to compile my openCL programs on a laptop which has an intel CPU with integrated graphics (also running manjaro). So it might be that there is a lack of relevant software available for intel non-IG CPU’s on unix/arch based systems.

You might also check out Mesa3D. It looks like it supports some OpenCL, with and without GPUs (see Mesa Matrix).

Do you happen to know if the Mesa also applies to intel CPU’s? When I checked the matrix, it doesn’t seem to list anything related to intel , but I could be wrong?

I don’t have any experience with Intel OpenCL runtimes, but since you’re on Linux and have an Intel CPU without integrated graphics support, you might check out the OpenCL runtime here:

titled:

  • Intel® CPU Runtime for OpenCL™ Applications 18.1 for Linux* OS (64bit only)

It sounds like their “Intel Graphics Runtimes” are for those with integrated graphics, and “Intel CPU Runtimes” are for those possibly without integrated graphics. A comment on the page suggests you can install both at the same time and they can coexist, but there’s no benefit of doing so in your case.

No, I sure don’t. I didn’t realize it even supported any OpenCL until I did a quick websearch in response to your original post.

I would ask the Mesa3D guys for details here. They have a mailing list.

Thanks a lot for the clear reply. I’ll probably need the runtime in the link you have provided then

Cheers