When I follow the official guide for installing the AMDGPU-Pro drivers (I've tried both the 17.30 and the very recent 17.40 releases) everything seems to work but
clinfo still returns
Number of platforms 0
Does anyone have any ideas?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
I just spent the whole day on this too - I couldn't find any working instructions so here's what I came up with for AMD Radeon RX 580 on Ubuntu 16.04 system with no graphical desktop, installed over SSH:
Assume a fresh Ubuntu install system
Get the AMD APP SDK from here - Download, Unpack and then use
sudo to run the install script.
Download the most recent linux driver (17.50 at time of writing this answer) from here, extract the
.xz file using
tar Jxvf <filename> and
cd into the directory created after extracting the
Now run the installer with
sudo ./amdgpu-pro-install --opencl=legacy -y
clinfo again and you should see that you now have OpenCL 1.2 support:
$ clinfo|grep OpenCL Platform Version: OpenCL 2.1 AMD-APP (2527.3) Execute OpenCL kernels: Yes Device OpenCL C version: OpenCL C 1.2 Version: OpenCL 1.2 AMD-APP (2527.3)
The reason for this is that specifying
--legacy pulls in
opencl-amdgpu-pro-icd which is not normally installed.
I think this is because the latest drivers want to do things with ROCm: https://rocm.github.io/ROCmInstall.html
On my own rig, ROCm is unusable because I've got PCI-e 1x slots with risers and a basic Pentium CPU instead of an i7. You check that ROCm was disabled like this:
$ dmesg |grep atomic [4.885958] kfd kfd: skipped device 1002:67df, PCI rejects atomics
So I guess this is why I had to do legacy to get OpenCL working at all.
I'm not sure what the pros/cons are of OpenCL 1.2 vs OpenCL 2.0 vs ROCm, or even if the ROCm driver presents as OpenCL 2.0 externally - would be great if someone with more insight could comment.
OpenCL failed because I had issues building the DKMS module, due to my kernel.
Upgrading my kernel to the following version got clinfo reporting OpenCL support on Ubuntu 16.04.4 LTS.
clinfo|grep OpenCL Platform Version OpenCL 2.0 AMD-APP (2482.3) Device Version OpenCL 1.2 AMD-APP (2482.3) Device OpenCL C Version OpenCL C 1.2 Run OpenCL kernels Yes