How do I get a Radeon RX 550 working with OpenCL on Ubuntu 16.04?
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 usingtar Jxvf <filename>
andcd
into the directory created after extracting the.xz
file.-
Now run the installer with
sudo
:sudo ./amdgpu-pro-install --opencl=legacy -y
Reboot
-
Run
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.
tamale
mid 30's computer geek from illinois cloud sre at confluent.io die-hard ubuntu/linux/open-source fan
Updated on September 18, 2022Comments
-
tamale almost 2 years
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 returnsNumber of platforms 0
Does anyone have any ideas?
-
Geoff Williams about 5 yearsThis is an old answer.. you can use risers now apparently :) In the meantime I gave up and bought windows 10
-
Roel Van de Paar over 4 yearsFantastic answer. This + using an older kernel (4.18) was the only thing which would get my AMD RX480 working on Ubuntu 18.04. Fantastic.