Page 1 of 1

How-to: AMDGPU-Pro OpenCL on RX580

PostPosted: Feb 12th, '20, 02:36
by yankee495
I'm using fully updated Mageia 7 x64 and tested with Darktable 2.63
I previously had it working with Darktable 3.0 but I had to compile 3.0.
I had a bad hard drive crash and am sharing everything as I reinstall while it's fresh on my mind.

OpenCL is much better on AMD cards than on Nvidia cards but getting it working takes a little work. It will work with cards besides the RX580.
This only looks long and complicated because I tried to make it detailed. It's really very easy.

I'll try and get this right the first time. You should know how to use the terminal but most of it can be done with Dolphin if you'd rather drag and drop everything. You can get Dolphin working in root mode by installing the kde-rootactions-servicemenu package in MCC and running a couple of commands as explained here:

Download amdgpu-pro-19.50-967956-rhel-8.1.tar.xz from here:

RHEL x86 64-Bit 19.50 Release Date 12/19/2019
Radeon™ Software for Linux® Driver for RHEL 8.1 / CentOS 8.1

Next, extract all of the RPM packages into a folder and find clinfo-amdgpu-pro-19.50-967956.el8.x86_64.rpm
and put the clinfo executable in /usr/bin

Then sort these out into another folder to make them easier to work with.


Make a folder called opencl_files. I opened each RPM with Ark and dragged and dropped the files into opencl_files.
There are multiple /etc and /opt folders and files and they'll just write into other folders.

Open Konsole and switch to root user. Then enter the opencl_files folder.

Code: Select all
cd opencl_files

mkdir /etc/OpenCL

mkdir /etc/OpenCL/vendors

cp etc/OpenCL/vendors/* /etc/OpenCL/vendors/

cp -R opt/amdgpu* /opt/

Now the dynamic linker needs updated so it knows the location of the libraries.
You need to create a file in /etc/ and put the following lines in it.

Create the file /etc/

Code: Select all

Then run ldconfig:

Code: Select all

Run clinfo -l to see if it's working.

Code: Select all
clinfo -l

Mine shows:

Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.1 AMD-APP (3004.6)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

Number of devices: 1
Vendor ID: 1002h
Board name: Radeon RX 580 Series

Name: Ellesmere
Device OpenCL C version: OpenCL C 1.2
Driver version: 3004.6
Version: OpenCL 1.2 AMD-APP (3004.6)

You can also use Radeon Profile to monitor the card. Be careful. It does allow overclocking and you can damage your card.

It's great to watch the card react to changes in Darktable other other programs using OpenCL.
You can watch the temperature and clock speeds change to make certain it's actually working.
Good luck.

Re: How-to: AMDGPU-Pro OpenCL on RX580

PostPosted: Feb 2nd, '21, 02:50
by scanray
Thanks for your contribution, it helped me a lot.

In the latest version (20.45) the libopencl and opencl-amdgpu-pro files do not come. Maybe with another name ??
Well, I have used the version (20.10) and it works very well

Thank you very much