How-to: AMDGPU-Pro OpenCL on RX580

How-to: AMDGPU-Pro OpenCL on RX580

Postby yankee495 » Feb 12th, '20, 02:36

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: https://forums.mageia.org/en/viewtopic.php?p=77892#p77892

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

https://www.amd.com/en/support/graphics/radeon-500-series/radeon-rx-500-series/radeon-rx-580

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.

libdrm-amdgpu-common-1.0.0-967956.el8.noarch.rpm
libopencl-amdgpu-pro-19.50-967956.el8.x86_64.rpm
opencl-amdgpu-pro-icd-19.50-967956.el8.x86_64.rpm
opencl-orca-amdgpu-pro-icd-19.50-967956.el8.x86_64.rpm

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/ld.so.conf.d/ and put the following lines in it.

Create the file /etc/ld.so.conf.d/amdgpu-pro.conf

Code: Select all
/opt/amdgpu-pro/lib64/



Then run ldconfig:

Code: Select all
ldconfig


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
Device Type: CL_DEVICE_TYPE_GPU
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.

https://software.opensuse.org/package/radeon-profile

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.
There are 10 types of people, those who understand binary & those who don't.
Main Desktop
http://www.overclock.net/lists/display/view/id/3960066
yankee495
 
Posts: 425
Joined: May 25th, '12, 13:10
Location: Carthage, Mo. USA

Return to Video

Who is online

Users browsing this forum: No registered users and 1 guest