Install OpenCL from amdgpu-pro under Ubuntu non supported version

Edit: For an easier solution see below

original post deleted as the official way requires less manual configuration

And if the admins feel that this explanation should be moved to the main thread

https://discuss.pixls.us/t/using-amd-open-source-and-the-amdgpu-pro-opencl-driver-for-image-processing

than please append it there and delete it here or let me know, than I will do it.
I just felt, that the other thread points more to rocm in the meantime

This might have “just worked”:

amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms

i.e. open source amdgpu kernel module + OpenCL libraries from the prorietary AMDGPU-PRO.

2 Likes

will try it out

Yes, I did set it up like that on several Ubuntu systems, though it was
before 18.04.4, I think. OpenCL installed this way worked on 19.10 and
20.04 (alpha).
math.dartmouth.edu/~sarunas/amdgpu.html

1 Like

just tried it out with 19.50 on my system (18.04.4).
Works! Even though version is not officially supported.

Very nice. Couldn’t find the --no-dkms switch on the readthedocs documentation but with the -h switch it shows up.
Thank you for pushing me there.

I pointed to your solution in my first post

@wallie, you don’t need to flag the post, as it means the whole thread would be deleted. The way you’ve edited it is fine.

Dear admins,

Please restore the original post.

The proposed “official” way to use amdgpu-pro-install work only after a successful installation of the whole package from AMD. The caveat is the installation can be compleated ONLY on Ubuntu 18.04.

In a couple of days, Ubuntu 20.04 will be released. To insist to install hardware driver on two releases older distribution, just because the maintainer (AMD) has not had a chance to update the driver installation is not reasonable.

Please restore the original post because it provides a shortcut to install OpenCL drivers today, on Ubuntu other than 18.04 until AMD catches up with the Ubuntu release or decide to do the package release agnostic.

Below is the script which has to be run from the directory where the Ubuntu installation archive was extracted:

#!/bin/bash

dest=/tmp/extract

mkdir -p “$dest”
for f in libopencl1-amdgpu-pro_amd64.deb opencl-amdgpu-proamd64.deb opencl-amdgpu-pro-devamd64.deb opencl-amdgpu-pro-icdamd64.deb opencl-orca-amdgpu-pro-icd*_amd64.deb ; do
dpkg -x $f “$dest”
done

sudo mkdir -p /opt/amd/lib
cp “$dest/opt/amdgpu-pro/lib/x86_64-linux-gnu/*.so” /opt/amd/lib

sudo mkdir -p /etc/OpenCL/vendors
sudo cp “$dest/extract/etc/OpenCL/vendors/*.icd” /etc/OpenCL/vendors/

echo “/opt/amd/lib” | sudo tee /etc/ld.so.conf.d/amd.conf

It should be possible to install via the official script with --no-dkms as mentioned in the previous posts.
@sugarbravo confirmed successfull installs on 19.10 and 20.04 (alpha). Read above.

In the original post i basically followed the instructions here with adjusted deb names of the recent amd package.
Even though nothing gets installed via package manager this way, there are some manual commands with elevated rights. This might not be for everybody. Be careful. Therefore I prefer the use of the amd install script with --no-dkms.

Both ways work on my system