**This is an old revision of the document!**

OpenCL is an open framework that enables a computer to recruit all manner of other computational devices (such as a GPU and additional CPUs) to distribute a workload. Depending on the hardware you have available, OpenCL can speed up graphics processing by orders of magnitude.

TL;DR
OpenCL is still a developing technology. If you are building a high performance render farm, it is worth learning and implementing. If you are a regular user doing heavy graphic work, enable OpenCL if it's available to you for some potential benefits, but don't break the bank to to make it happen.

Strengths [Weaknesses]

Parallelism

Your computer potentially has a lot more computing power at its disposal than what you are using. Unlock it with OpenCL.

Weaknesses [Strengths]

Specialised

OpenCL is becoming more common, but for now it is still fairly specialised. Not all applications (or the OS itself, for that matter) utilise OpenCL, and even if they do, OpenCL depends heavily upon the hardware it has available. If your system is not top-of-the-line, you may not see much of a improvement.

Pre-Requisites

Before attempting to get OpenCL up and running, get the specs of your system with cpuinfo and lspci:

$ lspci | grep VGA
[...] NVIDIA [Quadro 5000] (rev c2)

Refer to product documentation to determine whether your GPU is OpenCL capable.

$ egrep sse[3456] /proc/cpuinfo
flags : fpu vme [...] sse3 [...] sse4_1 [...]

If your terminal returns anything, then it is OpenCL capable.

Installing OpenCL

The OpenCL framework consists of an OpenCL library providing the actual API (the programming bits that applications seeking to use OpenCL will actually use), device drivers (to drive the GPU or other OpenCL capable device), and the OpenCL code compiler and header files (needed to build applications with OpenCL enabled).

Here is what you need to do to get them, and to enable them:

Headers

Whether you intend to develop applications using OpenCL or not, in order to build and install OpenCL-capable applications, you need the OpenCL header files.

OpenCL headers are available from http://slackbuilds.org.

OpenCL Library

OpenCL libraries (the .so files in /usr/lib*) mainly come from Nvidia and AMD (other vendors have implementations, but these are the most-used libs, since these are the two most common high-end graphic cards). OpenCL being an open standard, it does not actually matter which library you use. In fact, the OpenCL library you end up with will most likely be dictated by the GPU you have in your computer; the OpenCL library will come along with the driver that you install.

Therefore, to get the OpenCL library, install a driver for your graphics card and, if available, for your CPU:

  • Nvidia drivers are available from http://slackbuilds.org or directly from Nvidia.
    • AMD drivers, such as they are, are available from http://amd.com.
    • For Intel CPUs and graphic chips, generic drivers come bundled with the Intel Media Server Studio package. This requires registration with Intel and an email verification containing the actual download link. One downloaded, the libraries are located in MediaServerStudioEssentials/SDK20ProductionX.Y*/Generic. For more specific device drivers, see https://software.intel.com/en-us/articles/opencl-drivers.

    </WRAP>

Installable Client Drivers (ICD)

It's possible to install multiple vendor-specific implementations of OpenCL technology on the same machine, at the same time. Your OpenCL driver of choice is (ie, libcl or libopencl) loads an Installable Client Driver (defined by an .icd file). The ICD Loader enables an OpenCL application to access all platforms and all devices present in the system, so if you have devices by more than one vendor in your computer (and it's likely that you do), it's to your advantage to define them all.