OpenCL, how do I get it when AMD will only give the propriety drivers to paid enterprise versions of Linux as far as I know? I have an AMD® Radeon (tm) r9 380 series and since I upgraded my OS, I no longer have OpenCL and all avenues explored has proved to be convoluted and a dead end.
EDIT: I made a new thread about this.
I keep meaning to write this up somewhere... TBH the main thing stopping me is that I can't think of a name for the GitLab repo.
I've managed to install just the OpenCL ICD from AMDGPU-PRO without messing up Debian's normal Mesa drivers, and it all works fine on my machine.
AMD expects you to install the AMDGPU-PRO driver as one big bundle, and their .debs for Ubuntu all depend on this one meta-package to try to make sure you install the whole thing together. Last time I checked, installing the whole bundle on Sid breaks OpenGL, possibly by replacing the Mesa driver with an older version.
So I made a little dummy package to 1) convince apt that AMD's stupid metapackage is installed and 2) set up the linker path, since they install the driver to /opt/amdgpu-pro/lib/x86_64-linux-gnu. That allowed me to install only opencl-orca-amdgpu-pro-icd_[version]_amd64.deb from the official AMDGPU-PRO release for Ubuntu (I have an rx470; for some newer cards you would want opencl-amdgpu-pro-icd_[version]_amd64.deb instead).
For a couple of months now, the proprietary OpenCL drivers have been working just fine alongside the open-source "everything else" drivers from Debian on my machine. I have tested it by running Blender and LuxMark.
If you're interested, I can post my dummy package and maybe some better-worded instructions. This comment ended up a bit long-winded, but all you actually need to do is install the dummy package and then install a single .deb from AMD's huge .tar.gz.
Also, somebody please tell me what to name the repo...
More on reddit.comUsing integrated AMD-GPU for OpenCL?
Looking for AMDGPU-PRO 21.40.1 .tar.xz for Polaris on Ubuntu 22.04
A cleaner way of installing the OpenCL driver from AMDGPU-PRO on Debian
Videos
Hey there, one question. I am using an old RX570 for KataGo with OpenCL. Now I switched to a new Ryzen 5700G with integrated GPU, and I thought I could use that as well for speeding up calculation. KataGo does support more than 1 OpenCL-device, but when I check with "clinfo", I only see the RX570. I did enable the integrated GPU in BIOS, but it doesn't show up... any ideas?
w@w-mint:~$ clinfo Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.1 AMD-APP (3380.4) Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Platform Host timer resolution 1ns Platform Extensions function suffix AMD Platform Name AMD Accelerated Parallel Processing Number of devices 1 Device Name Ellesmere Device Vendor Advanced Micro Devices, Inc. Device Vendor ID 0x1002 Device Version OpenCL 2.0 AMD-APP (3380.4) Driver Version 3380.4 (PAL,HSAIL) Device OpenCL C Version OpenCL C 2.0 Device Type GPU Device Board Name (AMD) Radeon RX 570 Series Device Topology (AMD) PCI-E, 01:00.0 Device Profile FULL_PROFILE Device Available Yes ...
I just did a fresh install to a USB3.0 thumb drive using 22.04.2 LTS and was able to get my RX 5600XT working with OpenCL. 5600XT is a Navi10, the 6700XT is a Navi22. Maybe it will work...
I grabbed the non-HME version 22.40.3 for Ubuntu 22.04.2. dpkg -i....then:
root@yada:/# amdgpu-install --usecase=workstation,rocm,opencl --opencl=rocr,legacy --vulkan=pro --accept-eula
There was a couple messages about missing firmware in /lib/firmware/amdgpu which appears to be common but they were a handful of specific code named GPU's. Looking at that directory shows a bunch of files for many types like Pitcairn, and Navi, and Vega.
Did a reboot and clinfo shows the 5600XT.
If you plan on compiling things with OpenCL support such as JTR be sure to:
sudo apt-get -y install ocl-icd-opencl-dev opencl-headers
Lastly, I added my user to groups video and render but I'm not getting any devices when I run clinfo or john --list=opencl-devices. Running as root works fine. Close enough for me.
Update May 2024
For the current Ubuntu 22.04.4 LTS I had to use an older version of the amd install scripts and downgrade my kernel to get it to work. rocm was picky and reading my failed makefile log trying to install the latest 6.0.6 installer threw errors during DKMS compiling. If anyone finds a newer combination please advise.
Grab amdgpu-install version 5.5.3 dpkg -i amdgpu-install_5.5.50503-1620033.22.04_all.deb
Install kernel
sudo apt-get install linux-image-5.19.0-45-generic linux-headers-5.19.0-45-generic linux-modules-extra-5.19.0-45-generic
reboot...remove newer kernel otherwise DKMS will find it and try building modules and fail.
sudo apt-get remove linux-image-6.5.0-28-generic
sudo apt autoremove
Possibly reboot once more then run the original commands above and everything will install. No error about missing firmware like before, and following the advice of @askcompu rebooting after a usermod -a -G video,render [user] worked fine. clinfo now displays the card running as a user instead of root.
I encountered same issues with missing packages. So I unpacked the install.deb from AMD and extracted the repository URLs. The .deb is some kind of ZIP. The folder is etc/apt/... Putting this URLs manually to my sources.list and "apt update" and the install runs smooth.