I use two desktops and I finally found the time to do a planed hardware swap that required the disassembly of both systems.
Preparing the fresh install of my linux system, I realized that OpenSuse has released Leap 15.2.
Initially I wanted to set up a Tumbleweed System but hey, why not give it a try at this point?!
Installation went flawlessly and I started with setting up opencl with rocm.
I followed this instruction, almost remembered that /opt/rocm needs to be linked to /opt/rocm-x.x.x and fired up
1 platform found but 0 device
Adding my user to video group as described on rocm documetation for a complete setup did not help.
Than I realized that in the
repo, the required files are listed in a versioned format and in a non versioned format.
Here as an example
zypper se -s rocm-opencl
S | Name | Typ | Version | Arch | Repository
| rocm-opencl | Paket | 2.0.20191-1 | x86_64 | Radeon Open Compute
| rocm-opencl-dev3.5.0 | Paket | 2.0.20191-1 | x86_64 | Radeon Open Compute
| rocm-opencl-devel | Paket | 2.0.20191-1 | x86_64 | Radeon Open Compute
i+ | rocm-opencl3.5.0 | Paket | 2.0.20191-1 | x86_64 | Radeon Open Compute
I went for the versioned files but I really couldn’t find a point in the documentation that explains this.
So the first question is:
Does anyone know?
Next I tried
sudo clinfo and voilà, I got opencl support up and running. Without elevated rights the problem remained. Looks like I had a permission problem. I checked all file’s permissions but everything looked fine.
One very good solution to troubleshoot I found on github was to use
strace -f clinfo 2> trace1.txt
that pretty much wrote everything that happened in this text file. I did the same with elevated rights and wrote it in another file and loaded both into a compare view.
The point where clinfo ran into problems was trying to access /dev/kfd.
A quick listing showed that on my install /dev/kfd had permissions set to 600. I found a github thread, a year old, where someone ran into the same problem with an ubuntu system.
Solution presented was, as /dev/kfd is controlled by udevd, to write a udev rule.
/etc/udev/rules.d/81-kdf.rules and added the line
KERNEL=="kfd", MODE="0660", GROUP="video", TAG+="uaccess"
I also followed the advice to create a new initramfs. On OpenSuse it is
Opencl now does work.
My second question here is
As I have not ran into that problem before, I am wondering if this should be considered a bug and if it should be adressed to rocm or OpenSuse?