If you read different types of manuals how to compile OpenCL software on Linux, then you can get dizzy of all the LD-parameters. Also when installing the SDKs from AMD, Intel and NVIDIA, you get different locations for libraries, header-files, etc. Now GPGPU is old-fashioned and we go for heterogeneous programming, the chances get higher you will have more SDKs on your machine. Also if you want to keep it the way you have, reading this article gives you insight in what the design is after it all. Note that Intel’s drivers don’t give OpenCL support for their GPUs, but CPUs only.
As my mother said when I was young: “actually cleaning up is very simple”. I’m busy creating a PPA for this, but that will take some more time.
First the idea. For developers OpenCL consists of 5 parts:
- GPUs-only: drivers with OpenCL-support
- The OpenCL header-files
- Vendor specific libraries (needed when using -lOpenCL)
- libOpenCL.so -> a special driver
- An installable client driver
Currently GPU-drivers are always OpenCL-capable, so you only need to secure 4 steps. These are discussed below.
Please note that in certain 64-bit distributions there is not lib64, but only ‘lib’ and ‘lib32’. If that is the case for you, you can use the commands that are mentioned with 32-bit.