The way, suggested by Nick Weinberg, installs a pretty outdated version of the driver, therefore I would suggest to download the one directly from your hardware vendor.
Since you have Intel CPU, do the following
- Open the Intel OpenCL drivers web-page, go to "Intel CPU Runtime for OpenCL™ Applications 18.1 for Linux* OS (64bit only)" and press "Download"
- The web-site will ask you to register and login. This is mandatory. Then you will be directed to the link with tgz-archive.
Download this archive and install it as follows.
tar -pvxf l_opencl_p_18.1.0.013.tgz
This installation script will write a lot of libraries into
/opt/intel and will create a symbolic link (or replace the old one)
My understanding of the subject is that the above steps allow OpenCL to access your Intel CPU. But if you have Intel HD Graphics, it makes sense to allow OpenCL to use this integrated graphics too. Then do the following
- Open the Intel OpenCL drivers web-page again, but this time go to "Linux* OS Ubuntu* 16.04.x (deb)" under "Intel® Graphics Technology" section. Then you have two choices: "Download" and "Build". Use the "Download" link, it will bring you to pre-built binaries ("Build" will bring you to the source code at Intel's github, but I have never tried to compile it from source).
Follow instructions given over there. I've just copied these here with one fix - use
sudo apt instead of
sudo dpkg -i *.deb since
dpkg does not check dependencies:
sudo apt install ./*deb
./*deb is important: without this dot you will get
Unable to locate and
Couldn't find errors.
P.S. the Intel website lists the suitable CPUs, make sure that yours is in this list.