Skip to content

Instantly share code, notes, and snippets.

@cmey
Last active September 29, 2023 14:36
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save cmey/a2b2223e7947b62bd94d405e290c9293 to your computer and use it in GitHub Desktop.
Save cmey/a2b2223e7947b62bd94d405e290c9293 to your computer and use it in GitHub Desktop.
Intel OpenCL drivers for Linux
# get OpenCL driver automated installer (installs kernel 4.7)
curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
chmod +x install_OCL_driver.sh
# install OpenCL driver
sudo ./install_OCL_driver.sh install
# check
ls /boot/vmlinuz-*intel*
@cmey
Copy link
Author

cmey commented Mar 21, 2018

This installs linux kernel 4.7 but we want 4.13.0-36-generic

@cmey
Copy link
Author

cmey commented Mar 24, 2018

Test OpenCL status with: Intel System Analyzer

curl https://software.intel.com/system/files/managed/d4/4d/sys_analyzer_linux.py_.tgz > sys_analyzer_linux.py_.tgz
tar -xvzf sys_analyzer_linux.py_.tgz
python sys_analyzer_linux.py -v

Should see at the bottom:
[ OK ] OpenCL check:platform:Intel(R) OpenCL GPU OK CPU OK

@cmey
Copy link
Author

cmey commented Mar 24, 2018

Manual Intel OpenCL Drivers installation, without installing(and patching) an old kernel (4.7)

Christophe's previous step before you follow the guide below:

curl http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip > SRB5.0_linux64.zip
unzip SRB5.0_linux64.zip

OpenCL™ Driver for Intel® HD, Iris™, and Iris™ Pro Graphics for Linux -- Installation [instructions]

sudo apt-get update
sudo apt-get install xz-utils
mkdir intel-opencl
tar -C intel-opencl -Jxf intel-opencl-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-devel-r5.0-63503.x86_64.tar.xz
tar -C intel-opencl -Jxf intel-opencl-cpu-r5.0-63503.x86_64.tar.xz
sudo cp -R intel-opencl/* /
sudo ldconfig

@cmey
Copy link
Author

cmey commented Mar 24, 2018

Print Ubuntu version:
lsb_release -a
Print kernel version that's running:
uname -r
Print kernel versions installed:
dpkg --list | grep linux-image

Verify CPU model name is Intel:
grep -m 1 name /proc/cpuinfo, should be:
model name : Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz

Verify GPU is Intel:
lspci -nn | grep VGA, should be:
00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:5927] (rev 06)

@cmey
Copy link
Author

cmey commented Mar 24, 2018

make sure you add your user to video group by:
sudo usermod -a -G video $LOGNAME

@cmey
Copy link
Author

cmey commented Apr 5, 2018

@cmey
Copy link
Author

cmey commented May 10, 2018

# from https://github.com/intel-iot-devkit/reference-implementation/tree/master/face-access-control

# get install_OCL_driver2_sh.tgz
web to https://software.intel.com/file/593325/download
tar xf install_OCL_driver2_sh.tgz
mkdir opencl-temp
sudo ./install_OCL_driver2.sh install --workspace opencl-temp
# answer No

@cmey
Copy link
Author

cmey commented Aug 24, 2018

A new version of the Intel OpenCL driver for Linux is out.
See: https://github.com/intel/compute-runtime/releases

It should now be as simple as:

wget https://github.com/intel/compute-runtime/releases/download/18.33.11309/intel-opencl_18.33.11309_amd64.deb
dpkg -i intel-opencl_18.33.11309_amd64.deb
apt-get install -f

Note this driver is advertised to only work on Gen8+ hardware.

@cmey
Copy link
Author

cmey commented Aug 30, 2018

MBP 15 Mid 2014, has i7-4980HQ which contains an Iris Pro Graphics 5200 | GT3e

clinfo:
Device Name                                     Iris Pro
Release date: 2014
Microarchitecture: Haswell
Core Name: Crystal Well
Integrated GPU: Intel Iris Pro 5200

"Crystalwell is the codename of the L4 cache (eDRAM) featured in the Iris Pro-enabled Haswell CPUs. According to Intel, this superior quality memory is responsible for the increased performance of Iris Pro graphics."
(source)

Seventh generation according to wikipedia.

@cmey
Copy link
Author

cmey commented Sep 4, 2018

MBP 13 touch bar Mid 2017, has i7-7567U which contains an Iris Plus Graphics 650

clinfo:
Device Name                                     Intel(R) HD Graphics
Release date: 2017
Core Name: Kaby Lake
Microarchitecture: Kaby Lake
Integrated GPU: Intel® Iris™ Plus Graphics 650

Seventh generation according to wikipedia.

@lixiaoquan
Copy link

This file seems not exist any more

wget http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
--2019-05-27 15:54:21-- http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip
Resolving registrationcenter-download.intel.com (registrationcenter-download.intel.com)... 104.124.188.30, 2600:1406:d000:183::b, 2600:1406:d000:1bb::b
Connecting to registrationcenter-download.intel.com (registrationcenter-download.intel.com)|104.124.188.30|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2019-05-27 15:54:25 ERROR 404: Not Found.

@LittleSouken
Copy link

marco@mr-pc:$ sudo snap install mailspring
[sudo] senha para marco:
snap "mailspring" is already installed, see 'snap help refresh'
marco@mr-pc:
$ get OpenCL driver automated installer (installs kernel 4.7)
bash: erro de sintaxe próximo ao token inesperado (' marco@mr-pc:~$ get OpenCL driver automated installer (installs kernel 4.7) bash: erro de sintaxe próximo ao token inesperado ('
marco@mr-pc:$ get OpenCL driver automated installer (installs kernel 4.7)
bash: erro de sintaxe próximo ao token inesperado `('
marco@mr-pc:
$ curl https://software.intel.com/sites/default/files/managed/f6/77/install_OCL_driver.sh_.txt > install_OCL_driver.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28973 100 28973 0 0 101k 0 --:--:-- --:--:-- --:--:-- 101k
marco@mr-pc:$ chmod +x install_OCL_driver.sh
marco@mr-pc:
$ sudo ./install_OCL_driver.sh install
ERROR: this script is supported only on Ubuntu 14.04 and 16.04.

@daniele777
Copy link

Hi Guys need help .. i have hp250g4 with intel processor Intel(R) Celeron(R) N3050 @ 1.60GHz x 2
Gpu Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller i recive this error from software

ATTENTION! No OpenCL-compatible or CUDA-compatible platform found.

You are probably missing the OpenCL or CUDA runtime installation.

  • AMD GPUs on Linux require this driver:
    "RadeonOpenCompute (ROCm)" Software Platform (3.1 or later)
  • Intel CPUs require this runtime:
    "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 or later)
  • NVIDIA GPUs require this runtime and/or driver (both):
    "NVIDIA Driver" (440.64 or later)
    "CUDA Toolkit" (9.0 or later)

How to install this driver??? I have linux debian based "Deepin""
Thx

@cmey
Copy link
Author

cmey commented Jun 29, 2020

@Neil-Lunavat
Copy link

This process is such a headache. I just want my hashcat to work :(

@daniele777
Copy link

daniele777 commented Apr 10, 2021

There isn't some Command like sudo apt install opencl ???

@Neil-Lunavat
Copy link

There isn't some Command like sudo apt install opencl ???

Tried it bruv. Here's the result:

$ sudo apt install opencl
E: Unable to locate package opencl

@daniele777
Copy link

So can't install opencl with cuda ??

@Neil-Lunavat
Copy link

What do you mean? What do you want to do?

@ibitebyt3s
Copy link

ibitebyt3s commented Oct 21, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment