How-to: AMDGPU-Pro OpenCL on RX580

Here you'll find a place for solutions and hints.

Please use one of the support subforums below for questions or if you have any issues and need support.

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: 433
Joined: May 25th, '12, 13:10
Location: Carthage, Mo. USA

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

Postby scanray » Feb 2nd, '21, 02:50

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
scanray
 
Posts: 32
Joined: Feb 5th, '14, 08:53

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

Postby Northsoft » Dec 12th, '21, 09:13

Hello, I've followed this howto and I get an error:
Code: Select all
[root@localhost opencl_files]# clinfo -l
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


  Platform Name:                                 AMD Accelerated Parallel Processing
ERROR: clGetDeviceIDs(-1)
[root@localhost opencl_files]#

I have RX 5500 XT:
Code: Select all
[root@localhost opencl_files]# lspcidrake | grep -i amd
snd_hda_intel   : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse HD Audio Controller [MULTIMEDIA_AUDIO_DEV]
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 5 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [BRIDGE_PCI]
i2c_piix4       : Advanced Micro Devices, Inc. [AMD]|FCH SMBus Controller [SERIAL_SMBUS] (rev: 61)
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 7 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|FCH SATA Controller [AHCI mode] [STORAGE_SATA] (rev: 51)
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset PCIe Port [BRIDGE_PCI] (rev: 01)
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 0 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset PCIe Port [BRIDGE_PCI] (rev: 01)
ccp             : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Cryptographic Coprocessor PSPCPP [CRYPT_OTHER]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse GPP Bridge [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset SATA Controller [STORAGE_SATA] (rev: 01)
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 2 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
xhci_pci        : Advanced Micro Devices, Inc. [AMD]|Matisse USB 3.0 Host Controller [SERIAL_USB]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse GPP Bridge [BRIDGE_PCI]
snd_hda_intel   : Advanced Micro Devices, Inc. [AMD/ATI]|Navi 10 HDMI Audio [MULTIMEDIA_AUDIO_DEV]
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 4 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Root Complex [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 6 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse IOMMU
unknown         : Advanced Micro Devices, Inc. [AMD/ATI]|Navi 10 XL Upstream Port of PCI Express Switch [BRIDGE_PCI] (rev: c5)
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Function
unknown         : Advanced Micro Devices, Inc. [AMD]|FCH LPC Bridge [BRIDGE_ISA] (rev: 51)
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD/ATI]|Navi 10 XL Downstream Port of PCI Express Switch [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse Reserved SPP
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
xhci_pci        : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset USB 3.1 XHCI Controller [SERIAL_USB] (rev: 01)
unknown         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 1 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset PCIe Bridge [BRIDGE_PCI] (rev: 01)
Card:ATI Volcanic Islands and later (amdgpu): Advanced Micro Devices, Inc. [AMD/ATI]|Navi 14 [Radeon RX 5500/5500M / Pro 5500M] [DISPLAY_VGA] (rev: c5)
k10temp         : Advanced Micro Devices, Inc. [AMD]|Matisse/Vermeer Data Fabric: Device 18h; Function 3 [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse PCIe Dummy Host Bridge [BRIDGE_HOST]
unknown         : Advanced Micro Devices, Inc. [AMD]|FCH SATA Controller [AHCI mode] [STORAGE_SATA] (rev: 51)
unknown         : Advanced Micro Devices, Inc. [AMD]|Starship/Matisse GPP Bridge [BRIDGE_PCI]
unknown         : Advanced Micro Devices, Inc. [AMD]|400 Series Chipset PCIe Port [BRIDGE_PCI] (rev: 01)
[root@localhost opencl_files]#

UPD: it was amdgpu-pro-19.50-967956-rhel-8.1.tar.xz.
Northsoft
 
Posts: 33
Joined: Dec 18th, '12, 19:22
Location: Novosibirsk, Russia


Return to The magician suggests...

Who is online

Users browsing this forum: No registered users and 1 guest